gpt-image-2

Generate PNG images from natural-language prompts via OpenAI's gpt-image-2 model.

22|3|Updated Jul 28, 2024
One-click install
npx skills add https://github.com/webdevcody/go-mailing-list --skill gpt-image-2-webdevcody
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gpt-image-2
Source: https://github.com/webdevcody/go-mailing-list/tree/main/.claude/skills/gpt-image-2
Command: npx skills add https://github.com/webdevcody/go-mailing-list --skill gpt-image-2-webdevcody

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, curl, jq, base64, and includes scripts (resource) components.

What problem does it solve?

It removes the manual, time-consuming effort of creating visual assets by generating images directly from text prompts and placing them into the project for immediate use.

Core Features & Use Cases

  • Prompt-to-image generation: Creates a new PNG using OpenAI’s gpt-image-2 model from a user-provided prompt.
  • Project-ready output: Writes the generated image to a specified output path, creating parent directories as needed.
  • Mandatory optimization handoff: When the image is wired into a user-facing surface, it triggers optimize-page-images to reduce bloat and convert to more efficient formats before shipping.

Quick Start

Use gpt-image-2 to generate a portrait hero illustration by running the skill with your prompt, an output path under public or assets, and an appropriate size like 1024x1792.

Frequently Asked Questions about gpt-image-2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a hero image or OG image from a text prompt?▼

Generate a hero image or OG image from a text prompt by providing your prompt to the skill with an output path. It calls the OpenAI images endpoint to write a project-ready PNG file.

Do I need an API key to generate images for my product pages?▼

Yes, you need an API key to generate images for product pages. You must place a .openai-key file in your project root before executing the generation script to authenticate the OpenAI images endpoint request.

How do I optimize generated UI placeholder images before shipping?▼

To optimize generated UI placeholder images before shipping, the skill automatically triggers an optimization handoff. When the image is wired into a user-facing surface, it invokes optimize-page-images to reduce bloat and convert formats.

Can I use bash and curl to generate image assets for social previews?▼

Yes, you can use bash and curl to generate image assets for social previews. The skill executes a generate.sh script that uses curl and jq to call the OpenAI endpoint and write a PNG file directly to your project.

What is the best way to create logo illustration placeholders for a web project?▼

The best way to create logo illustration placeholders is to request an image via an explicit prompt command. The skill generates a new PNG from your description and creates any needed parent directories automatically for immediate use.

Why does my generated image not appear in my project directory?▼

Your generated image might not appear if the .openai-key file is missing from the project root, or if the output path is invalid. The script requires this key to execute the curl request and write the PNG successfully.