开放 API
GPT Image 2 API 文档
这里是图片生成、任务查询和 credits 查询的标准 OpenAPI 文档。Agent 和开发工具可以直接读取同一份 /openapi.json。
OpenAPI 3.1Bearer API keys图片生成Credits
推荐的 API 使用流程
当你想在自己的工具、Agent 或脚本里创建 GPT Image 2 图片任务时,优先使用这个 API。接口会先返回任务,再通过任务查询接口轮询到最终图片结果。
01
创建 Key
付费账号先创建 API key,调用时放在 Authorization: Bearer sk-gip-... 里。
02
创建并查询
POST prompt 到 /api/open/v1/images/generations,再用返回的 task id GET 查询,直到 success 或 failed。
03
查看结果
API 生成的图片会出现在 /workspace/history,并带有 API 标记,和网页生成历史放在同一个地方。
OpenAPI 3.1 Reference
Human-readable docs and the machine-readable spec are generated from the same OpenAPI source.