openai · OpenAI Platform Docs
Images and vision
A guide to implementing multimodal capabilities including image generation, image editing, and visual analysis using the OpenAI API.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Images and vision
A guide to implementing multimodal capabilities including image generation, image editing, and visual analysis using the OpenAI API.
When To Use
Use when you need to implement workflows for generating new images from text, editing existing images, or analyzing visual content within an application.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/images-and-vision-workflow-guide.md | A guide covering image generation, editing, and vision-based use cases using the OpenAI API. | Questions about a guide covering image generation, editing, and vision-based use cases using the OpenAI API. |
examples/images-and-vision-openai-images-and-vision-javascript-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/images-and-vision-openai-images-and-vision-python-image-generation-reque.python | A Python script demonstrating how to use the OpenAI client to generate an image using a text prompt and the imagegeneration tool. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate an image using a text prompt and the imagegene... |
examples/images-and-vision-openai-images-and-vision-cli-image-generation-request.cli | A CLI command demonstrating how to use the OpenAI API to generate an image of a cat and an otter using a YAML-formatted input. | Exact payloads, commands, or snippets shown in A CLI command demonstrating how to use the OpenAI API to generate an image of a cat and an otter using a YAML-formatt... |
examples/images-and-vision-openai-images-and-vision-javascript-request.javascript | A JavaScript example demonstrating how to send an image URL to the OpenAI API to request a visual description. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to send an image URL to the OpenAI API to request a visual description. |
examples/images-and-vision-openai-images-and-vision-python-gpt-4-mini-request.python | A Python script demonstrating how to send an image URL to the gpt-4o-mini model using the OpenAI client to perform visual analysis. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to send an image URL to the gpt-4o-mini model using the OpenAI client to perform vi... |
examples/images-and-vision-openai-images-and-vision-csharp-client-response.csharp | A C# code example demonstrating how to use the OpenAI client to send an image URL for vision-based processing. | Exact payloads, commands, or snippets shown in A C# code example demonstrating how to use the OpenAI client to send an image URL for vision-based processing. |
examples/images-and-vision-openai-images-and-vision-curl-request.bash | A bash curl command demonstrating how to send an image URL and text prompt to the OpenAI API for vision analysis. | Exact payloads, commands, or snippets shown in A bash curl command demonstrating how to send an image URL and text prompt to the OpenAI API for vision analysis. |
examples/images-and-vision-openai-images-and-vision-cli-request.cli | A CLI command demonstrating how to send an image URL to a vision-capable model using the OpenAI API. | Exact payloads, commands, or snippets shown in A CLI command demonstrating how to send an image URL to a vision-capable model using the OpenAI API. |
examples/images-and-vision-openai-images-and-vision-javascript-base64-request.javascript | A JavaScript example demonstrating how to send a base64 encoded image to the OpenAI API for vision analysis. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to send a base64 encoded image to the OpenAI API for vision analysis. |
examples/images-and-vision-openai-images-and-vision-python-base64-encoding.python | A Python script demonstrating how to encode a local image to a base64 string for use with the OpenAI vision API. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to encode a local image to a base64 string for use with the OpenAI vision API. |
examples/images-and-vision-openai-images-and-vision.csharp | A C# code example demonstrating how to use the OpenAI client to process an image via a URL stream for vision capabilities. | Exact payloads, commands, or snippets shown in A C# code example demonstrating how to use the OpenAI client to process an image via a URL stream for vision capabili... |
examples/images-and-vision-openai-vision-files-api.javascript | A JavaScript code example demonstrating how to upload an image file to the OpenAI Files API for vision purposes. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to upload an image file to the OpenAI Files API for vision purposes. |
examples/images-and-vision-openai-vision-python-upload-and-response.python | A Python script demonstrating how to upload an image file using the Files API and use the resulting file ID to generate a vision-based response. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to upload an image file using the Files API and use the resulting file ID to genera... |
examples/images-and-vision-openai-images-and-vision-2.csharp | A C# code example demonstrating how to use the OpenAI client to process images and vision tasks. | Exact payloads, commands, or snippets shown in A C# code example demonstrating how to use the OpenAI client to process images and vision tasks. |
examples/images-and-vision-openai-images-and-vision-patch-count-calculation.text | A text snippet demonstrating the mathematical formula for calculating the original patch count based on image width and height. | Exact payloads, commands, or snippets shown in A text snippet demonstrating the mathematical formula for calculating the original patch count based on image width a... |
examples/images-and-vision-openai-images-and-vision-shrink-factor-calculation.text | A text representation of the mathematical formula used to calculate the shrink factor for image processing in vision models. | Exact payloads, commands, or snippets shown in A text representation of the mathematical formula used to calculate the shrink factor for image processing in vision... |
examples/images-and-vision-openai-images-and-vision-resized-patch-count-formula.text | A text representation of the mathematical formula used to calculate the number of resized patches for image processing in OpenAI vision models. | Exact payloads, commands, or snippets shown in A text representation of the mathematical formula used to calculate the number of resized patches for image processin... |
What This Skill Covers
- In this guide, you will learn about building applications involving images with the OpenAI API. If you know what you want to build, find your use case below...
- Main sections:
Overview,A tour of image-related use cases,Generate or edit images,Using world knowledge for image generation,Analyze images.
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/images-vision.md
