推荐使用异步链路:提交任务后轮询任务状态。图片生成通常需要几十秒到数分钟,异步方式更适合线上应用。
快速开始
用一个完整示例完成提交、轮询和取图。
文生图
查看
gpt-image-2 的请求参数和返回结构。任务查询
轮询
queued、in_progress、succeeded 和 failed 状态。尺寸与清晰度
选择画幅比例、1K、2K 和 4K 输出档位。
推荐接入方式
Base URL
常用入口
| 能力 | 页面 |
|---|---|
| 鉴权方式 | Authentication |
| 查询模型 | List models |
| 生成图片 | Create image generation |
| 编辑图片 | Create image edit |
| 查询任务 | Retrieve image task |
| APIMart 兼容 | APIMart compatibility |