Prompt Buddy logoPrompt Buddy

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...

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/image-generation-workflow-guide.mdA 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.javascriptA 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.pythonA 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.jsonA 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.javascriptA 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.pythonA 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.javascriptA 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.pythonA 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.javascriptA 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.pythonA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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