GPT Image 2 Text to Image Image API
GPT Image 2 Text to Image creates images from prompts in 1K, 2K or 4K, with aspect-ratio controls and optional transparent backgrounds.
About the GPT Image 2 Text to Image API
GPT Image 2 Text to Image creates images from prompts in 1K, 2K or 4K, with aspect-ratio controls and optional transparent backgrounds.
- Available image sizes: 1K, 2K, and 4K
- Operations: generation
- Local cost: 1K: 40 credits / 2K: 60 credits / 4K: 90 credits
- Result delivery: asynchronous task polling
Best uses for GPT Image 2 Text to Image
Model summary
- Credit cost
- 1K: 40 credits / 2K: 60 credits / 4K: 90 credits
- Output type
- image
- Operations
- generation
- Image sizes
- 1K, 2K, 4K
Generation request
POST /v1/images/generations
{ "model": "gpt-image-2-text-to-image", "prompt": "A cinematic product photograph with soft studio lighting", "aspect_ratio": "auto", "image_size": "1K", "response_format": "url"}Image field contract
| Field | Use | Values |
|---|---|---|
model | Required model ID | gpt-image-2-text-to-image |
prompt | Required generation or editing instruction | 1–20,000 characters |
aspect_ratio | Output ratio | auto, 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 2:1, 1:2, 3:1, 1:3, 21:9, 9:21, 5:4, 4:5 |
image_size | Resolution tier | 1K, 2K, 4K |
image_urls | Required only for edits | 1–16 public HTTPS URLs |
background | Optional background mode | auto, opaque, transparent |
response_format | Optional | url |
At 2K and 4K, ratios 5:4, 4:5, 3:1, 1:3 and 9:21 are unavailable. Use image_size for the resolution tier; size is not supported.
Review the complete image API guide.
GPT Image 2 Text to Image API FAQ
What can GPT Image 2 Text to Image do?
GPT Image 2 Text to Image supports asynchronous generation. GPT Image 2 Text to Image creates images from prompts in 1K, 2K or 4K, with aspect-ratio controls and optional transparent backgrounds.
Which output sizes does GPT Image 2 Text to Image support?
GPT Image 2 Text to Image supports 1K, 2K, and 4K. Use the exact model ID and size fields documented on this page so the request can be validated locally.
How many credits does GPT Image 2 Text to Image use?
The current local price is 1K: 40 credits / 2K: 60 credits / 4K: 90 credits. The task stores its quoted cost when it is created.