GPT: gpt-image-2
gpt-image-2
GPT Image 2 is an OpenAI model for high-fidelity image generation and editing through the dedicated Images API. It supports text-to-image generation and image-to-image editing.
text → image → image
Modalities
In / Out Price
40% off$3/ 1M
$5 Official price
$0/ 1M
$0 Official price
400K
Context
Jun 23, 2026
Released
Providers
This model is hosted by one provider. Requests are forwarded to it directly, with no routing decisions to make.
Call this model in three steps.
1
Get your API key
Create a key and set your API key and base URL as environment variables.
Create API KeyEnvironment
export UNIROUTER_API_KEY="<YOUR_API_KEY>"
export UNIROUTER_BASE_URL="https://api.tokatlas.com/v1"2
Choose a request format
Choose the format supported by your selected route.
3
Make your first request
Model ID: gpt-image-2
from openai import OpenAI
client = OpenAI(
base_url="https://api.tokatlas.com/v1",
api_key="<YOUR_API_KEY>",
)
response = client.images.generate(**{
"model": "gpt-image-2",
"prompt": "A serene koi pond at sunset.",
"size": "1024x1024",
"n": 1
})
print(response)Endpoint
Creates a model response for the given chat conversation.
- POST
- https://api.tokatlas.com/v1/images/generations
- Authorization
- Bearer $UNIROUTER_API_KEY
- Content-Type
- application/json