GPT Image 2.5 Ext

OpenAI图片生成按请求档位定价较官方价省 39%

Image generation and editing. 1K returns the generated image; 2K and 4K add an upscaling pass. Generates one image per task and supports up to 15 reference images. Final billing includes generation and completed upscale passes.

价格

$0.0065/ 次

端点

/images/tasks

交付模式

异步任务生命周期

可用状态

当前可用

API 文档

配置并复制请求

选择这个模型支持的选项,下面的代码会实时更新。

在文档里一步步看
POSThttps://www.aisplice.store/v1/images/tasksBearer API key异步任务

选项这里只展示当前模型已公开支持的选项。

# Requires curl and jq
API_KEY="${API_KEY:-YOUR_API_KEY}"

# 1. Submit once
SUBMITTED=$(curl --fail-with-body -sS https://www.aisplice.store/v1/images/tasks \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: model-docs-$(date +%s)-$$" \\
  -d '{
  "model": "GPT Image 2.5 Ext",
  "prompt": "A cinematic scene with careful composition",
  "size": "1:1",
  "resolution": "1K",
  "quality": "auto",
  "n": 1
}')
TASK_ID=$(printf '%s' "$SUBMITTED" | jq -r '.task_id // .id // empty')
if [ -z "$TASK_ID" ]; then
  printf '%s\n' "$SUBMITTED" >&2
  exit 1
fi
echo "task_id=$TASK_ID"

# 2. Poll until terminal
while true; do
  STATUS_JSON=$(curl --fail-with-body -sS \
    "https://www.aisplice.store/v1/images/tasks/$TASK_ID" \
    -H "Authorization: Bearer $API_KEY")
  STATUS=$(printf '%s' "$STATUS_JSON" | jq -r '.status // empty' | tr '[:upper:]' '[:lower:]')
  echo "status=$STATUS"
  case "$STATUS" in
    completed|succeeded|success) break ;;
    failed|failure|cancelled|canceled)
      printf '%s\n' "$STATUS_JSON" | jq .
      exit 1
      ;;
  esac
  sleep 3
done

# 3. Fetch the final result
curl --fail-with-body -sS \
  "https://www.aisplice.store/v1/images/tasks/$TASK_ID/content" \
  -H "Authorization: Bearer $API_KEY" | jq .
  1. 1提交任务
  2. 2轮询状态
  3. 3获取结果内容

该模型要求使用公网媒体地址。 先上传本地文件,再把 public_url 放入模型请求;避免发送大体积 Base64 请求体。

查看上传指南

参数说明

model
string必填

本次请求使用的精确模型标识。

gpt-image-2.5-ext
prompt
string必填

描述期望结果的指令。

size
string可选

输出宽高比或尺寸。

auto1:13:22:34:33:45:44:516:99:162:11:23:11:321:99:21
resolution
string可选

请求的输出分辨率。

1K2K4K
quality
string可选

For 2K/4K: low uses standard upscaling, auto/medium professional, and high enhanced. 1K returns the original image.

autolowmediumhigh
n
integer可选
1
images
string[]可选

Optional reference images for editing.

响应流程

查看任务状态、终态和结果响应示例。

提交
{
  "id": "task_xxx",
  "task_id": "task_xxx",
  "object": "image.task",
  "model": "GPT Image 2.5 Ext",
  "status": "queued"
}
结果内容
{
  "created": 1720000000,
  "data": [
    {
      "url": "https://media.example/result.png"
    }
  ]
}

等待中

queued · submitted · in_progress · processing

成功

completed · succeeded · success

失败

failed · failure · cancelled · canceled

错误与生产配置

查看重试规则、幂等要求和最小生产检查清单。

400 / 422

修正请求字段或不支持的选项,不要原样重试。

401

检查 API 密钥是否存在、有效,并已通过 Bearer Token 发送。

402

账户余额不足。

409

Idempotency-Key 正在处理中,或已被其他请求体使用。

429

按照 Retry-After 退避后再重试。

5xx

使用指数退避重试,并保留原始 Idempotency-Key。

  • 面向公众的移动端和浏览器应用应把 API 密钥保存在服务端。
  • 为每个会计费的异步操作设置唯一 Idempotency-Key。
  • 持久保存 task_id,以便重启后恢复轮询。
  • 为每个 HTTP 请求设置超时,并在支持工单中提供请求 ID。
  • 读取实时模型元数据,不要硬编码价格和支持选项。

价格与档位

较官方价省 39%

按请求计价

$0.0065/ 次

$0.010625

档位定价

基准价 $0.0065

档位定价——最终价格取决于请求的参数选项,未列出的档位按基准价计费。

尺寸价格
  • 16:9×1$0.0065
  • 1:1×1$0.0065
  • 1:2×1$0.0065
  • 1:3×1$0.0065
  • 21:9×1$0.0065
  • 2:1×1$0.0065
  • 2:3×1$0.0065
  • 3:1×1$0.0065
  • 3:2×1$0.0065
  • 3:4×1$0.0065
  • 4:3×1$0.0065
  • 4:5×1$0.0065
  • 5:4×1$0.0065
  • 9:16×1$0.0065
  • 9:21×1$0.0065
  • auto×1$0.0065
分辨率价格
  • 1k×1$0.0065
  • 2k×2.138040769231$0.013897
  • 4k×2.138040769231$0.013897
Quality / resolution价格
  • auto:1k×1$0.0065
  • high:1k×1$0.0065
  • low:1k×1$0.0065
  • medium:1k×1$0.0065
  • low:2k×1.189673461538$0.007733
  • low:4k×1.189673461538$0.007733
  • auto:2k×2.138040769231$0.013897
  • auto:4k×2.138040769231$0.013897
  • medium:2k×2.138040769231$0.013897
  • medium:4k×2.138040769231$0.013897
  • high:2k×8.586938461538$0.055815
  • high:4k×8.586938461538$0.055815
With reference价格
  • 1k×1$0.0065
  • 2k×2.138040769231$0.013897
  • 4k×2.138040769231$0.013897

页面展示的价格即实际计费价格,调用失败会自动退款。

相关模型