Runbase

Command Palette

Search for a command to run...

OpenAI

GPT Image 2.5

ID:openai/gpt-image-2.5

OpenAI 推出的 GPT Image 2.5 图像生成 API —— Flare 与 Sunburst 两个版本,支持 4K 输出、13 种宽高比,以及参考图编辑。

GPT Image 2.5ChatGPT Images 2.5OpenAI图像编辑局部重绘

概览

OpenAI 推出的 GPT Image 2.5 图像生成 API —— Flare 与 Sunburst 两个版本,支持 4K 输出、13 种宽高比,以及参考图编辑。

认证

所有 API 请求需要通过 Authorization 请求头以 Bearer 方式传递有效的 API 密钥。

快速开始

凭证

设置 RUNBASE_API_KEY 环境变量。

Shell
export RUNBASE_API_KEY=your-api-key

创建运行

Shell
curl -s https://runbase.net/api/v1/runs \
  -H "Authorization: Bearer $RUNBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2.5",
    "input": {
      "prompt": "一张陶瓷台灯的电影级产品照片"
    }
  }'

运行记录

运行以异步方式处理。提交请求后,轮询获取结果。

创建运行

Shell
curl -s https://runbase.net/api/v1/runs \
  -H "Authorization: Bearer $RUNBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2.5",
    "input": { "prompt": "一张陶瓷台灯的电影级产品照片" }
  }'

获取运行状态

Shell
curl -s https://runbase.net/api/v1/runs/RUN_ID \
  -H "Authorization: Bearer $RUNBASE_API_KEY"

获取结果

轮询状态接口,直到 status 为 "succeeded",然后从响应中读取 output.urls。

输入 Schema

参数类型必填描述
promptstring必填Prompt
variantstring可选Version选项: flaresunburst
aspect_ratiostring可选Aspect ratio选项: auto1:13:22:316:99:164:33:421:927:1616:279:88:9
resolutionstring可选Resolution选项: 1K2K4K
image_urlsstring[]可选Reference images

输出 Schema

字段类型描述
urlsstring[]生成的输出 URL

错误

API 使用标准 HTTP 状态码表示成功或失败。

状态码描述
400Invalid request - missing or malformed parameters
401Authentication failed - missing or invalid API key
402Insufficient credits
403Forbidden - IP not allowed or API key credit limit exceeded
404Run not found
429Rate limit exceeded
500Internal server error