#Models for Images
1 messages · Page 1 of 1 (latest)
Hi @latent dagger. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
From the provided sources, here’s what’s explicitly documented.
In the API
You can generate images through:
1. GPT Image models (recommended)
Supported in both the Image API and as the image tool in the Responses API:
gpt-image-1.5– latest, state‑of‑the‑art GPT Image model [GPT Image 1.5; Image overview]gpt-image-1gpt-image-1-mini[Model comparison]
These three are supported by the Image API’s generations/edits endpoints and by the Responses API’s built‑in image_generation tool. [Image overview]
When using the Responses API, you do not set model to a GPT Image model. Instead, you use a text model (e.g. gpt-4.1, gpt-5, etc.) plus the hosted image tool, which internally calls one of the GPT Image models. [Tools image-generation models]
Mainline models that can call the image tool include:
gpt-4o,gpt-4o-minigpt-4.1,gpt-4.1-mini,gpt-4.1-nanoo3gpt-5gpt-5.4,gpt-5.4-mini,gpt-5.4-nanogpt-5-nanogpt-5.2[Tools image-generation models]
2. DALL·E models (deprecated but still available)
Via the Image API:
dall-e-2dall-e-3[Image overview; DALL·E 3 model]
Both DALL·E 2 and 3 are marked as previous/older generation and are scheduled to be discontinued on 2026‑05‑12; GPT Image is recommended instead. [Model comparison]
In ChatGPT
The sources state:
- GPT‑4o image generation is “the default image generator in ChatGPT.” [ChatGPT images]
- Users can still access DALL·E via a dedicated “DALL·E GPT” inside ChatGPT. [ChatGPT images]
Separately, the chatgpt-image-latest model is documented as “Image model used in ChatGPT,” exposed via the same endpoints as GPT Image 1.5 (including image generations and edits). [chatgpt-image-latest]
The documents do not spell out exactly how GPT‑4o and chatgpt-image-latest relate internally, only that:
- GPT‑4o is the default image generator in the ChatGPT product. [ChatGPT images]
chatgpt-image-latestis “the image snapshot currently used in ChatGPT” and is available via the API. [chatgpt-image-latest]
So, based strictly on these sources:
- ChatGPT: GPT‑4o (default image generator) and a DALL·E GPT; internally uses the
chatgpt-image-latestimage model. - API: GPT Image models (
gpt-image-1.5,gpt-image-1,gpt-image-1-mini), plusdall-e-2anddall-e-3via the Image API, and a set of text models that can call the image tool in the Responses API.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@latent dagger Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@narrow sparrow is GPT 4o GPT Image 1?
Let me check the knowledge base for you again. One moment! :books:
No. GPT‑4o and GPT Image 1 are different model families.
- GPT‑4o is a general‑purpose, text-focused model that takes text and images as input and produces text output. [GPT‑4o model]
- GPT Image models (
gpt-image-1.5,gpt-image-1,gpt-image-1-mini) are dedicated image generation models that take text (and optionally images) as input and produce image output. [Image overview; Model comparison]
Some tools (like ChatGPT Images or the Responses API image tool) may use GPT‑4o as the main model and then call a GPT Image model under the hood, but the docs do not say that GPT‑4o is gpt-image-1. They are documented as separate models with different capabilities.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@latent dagger Kapa.ai is still learning and improving, please let me know how I did by reacting below.
How can I set the image generation to gpt-image-1?
@narrow sparrow How can I set the image generation to gpt-image-1?
Let me check the knowledge base for you again. One moment! :books:
To use gpt-image-1 you need to select it explicitly in the Image API, or configure it in the image_generation tool (Responses API).
1. Image API (direct image generation)
Set model to "gpt-image-1" in your images.generate call:
from openai import OpenAI
import base64
client = OpenAI()
result = client.images.generate(
model="gpt-image-1",
prompt="A cute baby sea otter",
size="1024x1024",
)
image_base64 = result.data[0].b64_json
image_bytes = base64.b64decode(image_base64)
with open("otter.png", "wb") as f:
f.write(image_bytes)
The Images API explicitly supports gpt-image-1, gpt-image-1-mini, and gpt-image-1.5 as valid model values.[Images createImage]
2. Responses API (image_generation tool)
With the Responses API, you don’t put gpt-image-1 in the top‑level model field. Instead:
- Use a text model (e.g.
gpt-4.1,gpt-4o,gpt-5, etc.) asmodel - Add the
image_generationtool - Optionally set the tool’s
modelto"gpt-image-1"
Example:
from openai import OpenAI
import base64
client = OpenAI()
response = client.responses.create(
model="gpt-4.1-mini",
input="Generate an image of a gray tabby cat hugging an otter with an orange scarf",
tools=[{
"type": "image_generation",
"model": "gpt-image-1"
}],
)
image_data = [
output.result
for output in response.output
if output.type == "image_generation_call"
]
if image_data:
image_base64 = image_data[0]
with open("cat_and_otter.png", "wb") as f:
f.write(base64.b64decode(image_base64))
The image_generation tool supports GPT Image models and lets you configure model, size, quality, etc.[Tools image-generation; Tools image-generation usage]
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@rough rapids Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@narrow sparrow Idk anything about this, so can you guide me through as to where to put it?
Let me check the knowledge base for you again. One moment! :books:
You control this in the code that calls the API. There are two main places you might set gpt-image-1:
1. Using the Image API directly
Here you call the Images endpoint and set model: "gpt-image-1" in the JSON body. [Images create]
Example with Python
from openai import OpenAI
import base64
client = OpenAI(api_key="YOUR_API_KEY")
result = client.images.generate(
model="gpt-image-1", # <‑‑ set it here
prompt="A cute baby sea otter",
size="1024x1024",
)
image_base64 = result.data[0].b64_json
image_bytes = base64.b64decode(image_base64)
with open("otter.png", "wb") as f:
f.write(image_bytes)
Example with curl
curl <https://api.openai.com/v1/images/generations> \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-1", // <‑‑ set it here
"prompt": "A cute baby sea otter",
"size": "1024x1024"
}'
In both cases, the "model" field is where you put "gpt-image-1". [Generate images]
2. Using the Responses API with the image tool
Here you:
- Choose a main model (like
gpt-4.1-mini) in the top-levelmodelfield. - Add the
image_generationtool. - Optionally set that tool’s
modelto"gpt-image-1". [Tools image-generation usage]
Example with Python
from openai import OpenAI
import base64
client = OpenAI(api_key="YOUR_API_KEY")
response = client.responses.create(
model="gpt-4.1-mini", # main chat model
input="Generate an image of a gray tabby cat hugging an otter with an orange scarf",
tools=[{
"type": "image_generation",
"model": "gpt-image-1" # <‑‑ set it here
}],
)
image_data = [
output.result
for output in response.output
if output.type == "image_generation_call"
]
if image_data:
image_base64 = image_data[0]
with open("cat_and_otter.png", "wb") as f:
f.write(base64.b64decode(image_base64))
Here, `"gpt-image-1"` goes inside the `tools` entry, not in the top-level `model`. [[Image tool options](<https://developers.openai.com/api/docs/guides/tools-image-generation#usage>)]
---
If you tell me:
- whether you’re using Python, JavaScript, or just curl, and
- whether you want “simple: just give me an image” or “chat that can also make images”
I can show you the exact minimal snippet you should copy‑paste and where to change only one line.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------