openai · OpenAI Platform Docs
Image generation
Teaches how to implement and configure the image generation tool within a model conversation, including parameter tuning for size, quality, and format, as well as managing multi-turn image editing and prompt optimizat...
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Image generation
Teaches how to implement and configure the image generation tool within a model conversation, including parameter tuning for size, quality, and format, as well as managing multi-turn image editing and prompt optimizat...
When To Use
Use when you need to implement a workflow where an AI agent generates new images or edits existing ones based on text prompts and user-provided image inputs.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/image-generation-workflow-guide.md | A guide detailing usage, tool options, and prompting tips for generating images using GPT Image models. | Questions about a guide detailing usage, tool options, and prompting tips for generating images using GPT Image models. |
examples/image-generation-openai-image-generation.javascript | A JavaScript code example demonstrating how to use the OpenAI client to generate an image using the image generation tool. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI client to generate an image using the image generation... |
examples/image-generation-openai-image-generation-python-client-request.python | A Python script demonstrating how to use the OpenAI client to generate an image using the image generation tool within a model response. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate an image using the image generation tool withi... |
examples/image-generation-openai-image-generation-api-response.json | A JSON object representing a successful response from the OpenAI image generation API including the revised prompt and image result. | Exact payloads, commands, or snippets shown in A JSON object representing a successful response from the OpenAI image generation API including the revised prompt an... |
examples/image-generation-openai-image-generation-2.javascript | A JavaScript code example demonstrating how to use the OpenAI client to request image generation via the responses API. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI client to request image generation via the responses API. |
examples/image-generation-openai-image-generation-python-client-request-2.python | A Python script demonstrating how to use the OpenAI client to request image generation via the tools parameter. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to request image generation via the tools parameter. |
examples/image-generation-openai-image-generation-3.javascript | A JavaScript code example demonstrating how to use the OpenAI client to trigger image generation via tool calls. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI client to trigger image generation via tool calls. |
examples/image-generation-openai-image-generation.python | A Python script demonstrating how to use the OpenAI API to generate images using the image generation tool within a model response. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI API to generate images using the image generation tool within a m... |
examples/image-generation-openai-images-generate-javascript-streaming.javascript | A JavaScript code example demonstrating how to use the OpenAI API to generate images with a streaming response. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI API to generate images with a streaming response. |
examples/image-generation-openai-image-generation-python-streaming-partial-images.python | A Python script demonstrating how to use the OpenAI client to generate images with streaming enabled to receive partial image updates. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate images with streaming enabled to receive parti... |
What This Skill Covers
- The image generation tool allows you to generate images using a text prompt, and optionally image inputs. It uses GPT Image models, including gpt-image-2, gp...
- Main sections:
Usage,Tool options,Revised prompt,Prompting tips,Multi-turn editing.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/tools-image-generation.md
