GPT-Image-2
GPT-Image-2 Official Channel Image Generation
- Official OpenAI gpt-image-2 model, compatible with the /v1/images/generations protocol
- Asynchronous processing mode, returns task_id for subsequent queries
- Text-to-image / Image-to-image all-in-one
- Added resolution tier field, supports 1K / 2K / 4K resolution options
- Supports 13 aspect ratios (4K tier supports 6 of them: 16:9 / 9:16 / 2:1 / 1:2 / 21:9 / 9:21)
- Up to 9 reference images, supports mixed URL and base64
- Submitted prompts undergo platform sensitive words / safety review, violating content will be directly rejected
POST
Documentation Index
Fetch the complete documentation index at: https://docs.aireiter.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
All endpoints require authentication using a Bearer Token.Get your API Key:Visit the API Key Management Page to obtain your API Key.Add the following to the request header when using:
Body
Name of the image generation modelFixed value
gpt_image_2_official (OpenAI official gpt-image-2 model)Model parameters object
Initiator task IDUser-defined task identifier, required
Size × Resolution Mapping Table
aspect_ratio × resolution → OpenAI Actual Pixels (13 ratios × 3 tiers):
| aspect_ratio | 1K | 2K | 4K |
|---|---|---|---|
1:1 | 1024×1024 | 2048×2048 | ❌ Pixel limit exceeded |
3:2 | 1536×1024 | 2048×1360 | ❌ Pixel limit exceeded |
2:3 | 1024×1536 | 1360×2048 | ❌ Pixel limit exceeded |
4:3 | 1024×768 | 2048×1536 | ❌ Pixel limit exceeded |
3:4 | 768×1024 | 1536×2048 | ❌ Pixel limit exceeded |
5:4 | 1280×1024 | 2560×2048 | ❌ Pixel limit exceeded |
4:5 | 1024×1280 | 2048×2560 | ❌ Pixel limit exceeded |
16:9 | 1536×864 | 2048×1152 | 3840×2160 |
9:16 | 864×1536 | 1152×2048 | 2160×3840 |
2:1 | 2048×1024 | 2688×1344 | 3840×1920 |
1:2 | 1024×2048 | 1344×2688 | 1920×3840 |
21:9 | 2016×864 | 2688×1152 | 3840×1648 |
9:21 | 864×2016 | 1152×2688 | 1648×3840 |
3:2/2:3@ 2K are actually 2048×1360 (approximate ratio, error < 0.5%); 4K supports only 6 ratios (combinations exceeding OpenAI’s total pixel limit are unavailable).
Response
Response status code
Returned data array
Query Task Result
Upon successful submission, atask_id is returned. Poll the task status using GET /v1/tasks/{task_id}. For details, see the Task Query Endpoint.
Polling Recommendations
- Initial Query Delay: Wait 10~20 seconds after submission before starting to query
- Query Interval: Recommend every 3~5 seconds
- Timeout Reference:
high + 2K/4Kcombination can take up to 130 seconds; client timeout recommendation ≥ 180 seconds