Generate images with the official OpenAI gpt-image-2 model — text-to-image, image-to-image, and inpainting (mask) in one API, with 1K / 2K / 4K resolution tiers
Documentation Index
Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
Use this file to discover all available pages before exploring further.
gpt-image-2 model, called via the gpt-image-1.5-official model namegpt-image-1.5-officialauto to let the server choose:1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 5:4 · 4:5 · 16:9 · 9:16 · 2:1 · 1:2 · 21:9 · 9:211k — 1024-base, fast and cost-effective (default)2k — 2048-base, suitable for posters and high-definition needs4k — 3840-base, only supports the 6 ratios above; high quality can take >120s| size | 1K | 2K | 4K |
|---|---|---|---|
1:1 | 1024x1024 | 2048x2048 | Not supported |
3:2 | 1536x1024 | 2048x1360 | Not supported |
2:3 | 1024x1536 | 1360x2048 | Not supported |
4:3 | 1024x768 | 2048x1536 | Not supported |
3:4 | 768x1024 | 1536x2048 | Not supported |
5:4 | 1280x1024 | 2560x2048 | Not supported |
4:5 | 1024x1280 | 2048x2560 | Not supported |
16:9 | 1536x864 | 2048x1152 | 3840x2160 |
9:16 | 864x1536 | 1152x2048 | 2160x3840 |
2:1 | 2048x1024 | 2688x1344 | 3840x1920 |
1:2 | 1024x2048 | 1344x2688 | 1920x3840 |
21:9 | 2016x864 | 2688x1152 | 3840x1648 |
9:21 | 864x2016 | 1152x2688 | 1648x3840 |
low — fast and economical, suitable for drafts/previewsmedium — balanced speed and qualityhigh — maximum detail, default value (4K + high can take 120s+)png — defaultjpeg — smaller file size (supports compression)webp format.0–100 (0 = no compression, 100 = maximum compression, default 100)Only applies when output_format is "jpeg"1 ~ 10image_urls. The mask must match the dimensions of the first reference image and include an Alpha channel (transparent areas indicate regions to be repainted)generation.taskqueued — waiting to be processedin_progress — processingcompleted — successfully completedfailed — failed