使用 OpenAI 官方 gpt-image-2 模型生成图像,支持文生图 / 图生图 / 局部重绘(mask)三合一,1K / 2K / 4K 分辨率档位
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 模型,通过 gpt-image-1.5-official 模型名调用gpt-image-1.5-officialauto 由服务端根据 prompt 自动选择: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 基准,速度快,日常够用(默认)2k — 2048 基准,适合海报 / 高清需求4k — 3840 基准,仅支持上述 6 个比例,high 质量下耗时可达 130s| size | 1K | 2K | 4K |
|---|---|---|---|
1:1 | 1024x1024 | 2048x2048 | 不支持 |
3:2 | 1536x1024 | 2048x1360 | 不支持 |
2:3 | 1024x1536 | 1360x2048 | 不支持 |
4:3 | 1024x768 | 2048x1536 | 不支持 |
3:4 | 768x1024 | 1536x2048 | 不支持 |
5:4 | 1280x1024 | 2560x2048 | 不支持 |
4:5 | 1024x1280 | 2048x2560 | 不支持 |
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 — 快速省钱,适合草稿/预览medium — 平衡速度与质量high — 最高精度,默认值(4K + high 耗时可达 120s+)png — 默认jpeg — 文件更小(支持压缩)webp 格式。0–100(0 不压缩,100 最大压缩,默认 100)仅对 output_format: "jpeg" 有效1 ~ 10image_urls 使用,遮罩图尺寸须与首张参考图一致,且需包含 Alpha 通道(透明区域为待重绘区域)generation.taskqueued — 排队等待处理in_progress — 处理中completed — 成功完成failed — 失败