GPT Image 2
GPT Image 2 is OpenAI's current image model, known for following detailed prompts closely and rendering readable text inside images, which most image models still handle poorly. It is billed by the tokens it generates rather than a flat rate per picture, so the cost tracks the size and detail you ask for instead of being fixed. The listed price is a standard-quality square image; drafts cost a fraction of that and the highest-detail renders cost more, and you are charged the exact amount rather than an estimate.
Pricing
Input
$0.053 / image
Output
—
Pay only for what you use. No subscriptions, no minimums.
Specs
- Context
- —
- Max output
- 4 images
- Latency
- Medium
- Category
- Image
Constraints & limits
Output
Presigned URLs (~24h TTL)
The gateway auto-clamps requests to the model's limits where possible.
Quick start
This sample hits the image generation endpoint. Change base_url and your key, then run it.
from openai import OpenAI
client = OpenAI(
api_key="tl-xxxxxxxxxxxxxxxxxxxxxxxx",
base_url="https://api.thalam.ai/v1",
)
response = client.images.generate(
model="openai/gpt-image-2",
prompt="A futuristic city skyline at sunset.",
size="1024x1024",
n=1,
)
print(response.data[0].url)Similar models
GPT Image 2.5 Fast
The quick half of GPT Image 2.5. Five detail levels, from a cent-scale draft to a finished frame, billed on what it actually renders.
GPT Image 2.5 Precise
The editing half of GPT Image 2.5. Give it up to four images and a prompt, and it changes what you asked for and leaves the rest alone.