gpt-image-2 model, based on /v1/images/generations compatible protocoltask_id for subsequent queriesresolution tier field — 1K / 2K / 4K selectiongpt-image-1.5-official — migration only requires changing the model namegpt-image-2-official (OpenAI official gpt-image-2 model)resolution.13 supported ratios:1:1 - Square (default, social avatars / logos)3:2 - Landscape (common DSLR ratio)2:3 - Portrait (vertical posters)4:3 - Landscape (classic monitor / slideshow)3:4 - Portrait5:4 - Landscape4:5 - Portrait (Instagram vertical post)16:9 - Landscape (widescreen video thumbnail)9:16 - Portrait (phone full-screen / short video cover)2:1 - Landscape (web banner)1:2 - Portrait21:9 - Landscape (cinematic ultra-wide)9:21 - Portrait1k - 1024 baseline, cost-efficient for daily use (default)2k - 2048 baseline, suitable for posters / high-definition needs4k - 3840 baseline, only 6 ratios supported (16:9 / 9:16 / 2:1 / 1:2 / 21:9 / 9:21)auto - Automatic (default, typically equivalent to low)low - Fast and economical, sufficient for rough outlinesmedium - Balancedhigh - Maximum precision (4K + high can take >120s)auto - Automatic (default)opaque - Opaquetransparent - ⚠️ gpt-image-2-official does not support transparent backgrounds; the system silently downgrades to autoauto - Default moderation strengthlow - More lenient moderationpng - Defaultjpeg - Smaller fileswebp - Optimal for modern browsers0-100jpeg / webp1 ~ 4image_urlssize × resolution → OpenAI actual pixels (13 ratios × 3 tiers):
| size | 1k | 2k | 4k |
|---|---|---|---|
1:1 | 1024×1024 | 2048×2048 | ❌ exceeds pixel cap |
3:2 | 1536×1024 | 2048×1360 | ❌ exceeds pixel cap |
2:3 | 1024×1536 | 1360×2048 | ❌ exceeds pixel cap |
4:3 | 1024×768 | 2048×1536 | ❌ exceeds pixel cap |
3:4 | 768×1024 | 1536×2048 | ❌ exceeds pixel cap |
5:4 | 1280×1024 | 2560×2048 | ❌ exceeds pixel cap |
4:5 | 1024×1280 | 2048×2560 | ❌ exceeds pixel cap |
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 |
Note:3:2/2:3@ 2K is actually 2048×1360 (1360 must be a multiple of 16, approximate 3:2 with <0.5% error);21:9@ 4K is 3840×1648 (exact 2.33:1). All others are exact ratios.
task_id is returned. Poll the task status via GET /v1/tasks/{task_id}, see Task Query API for details.
submitted → in_progress → completed / failed.
Image access: data.result.images[0].url[0].
high + 2k/4k combinations can take up to 130 seconds; client timeout ≥ 180 seconds recommendedPOST /v1/tasks/batch