OpenAI
GPT Image 2
实验性 · 合作伙伴模型 · 高级版。根据描述生成图像,并在生成前先进行一次推理。提示词包含多项相互关联的约束时,效果提升尤为明显,例如指定元素位置的布局、物体数量固定的场景,或必须包含一行指定文字的设计。输出尺寸为 512–2048 px。
公开 API 价格
查看所有价格档位~$0.0845 / 1024×1024
1024×1024~$0.0845
1536×1024~$0.0974
1024×1536~$0.0974
API 模型 ID
图像 API 接口
gpt-image-2- 端点
POST /api/v2/run- 输入
- Text prompt · Reference images
- 输出
- Image (PNG / WebP)
- 费率
- ~$0.0845 / 1024×1024
示例提示词“A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually …”
适用场景
- 使用一个 API 密钥,通过 POST /api/v2/run 文生图或分段上传图像进行编辑
- 使用预付点数前可通过 POST /api/v2/quote 免费估价
- 一个 API 密钥即可获得合作伙伴旗舰图像质量,提交时执行支出限额
- API 模型 ID
gpt-image-2- 模型开发者
- OpenAI
- 模态
- 图像生成与编辑
- 输入
- Text prompt · Reference images
- 输出
- Image (PNG / WebP)
- 端点列表
POST /api/v2/quotePOST /api/v2/runGET /api/v2/jobs/{request_id}GET /api/v2/jobs/{request_id}/outputMCP runstage_generate_media- 基础设施
- 合作云算力
请求参数
modelstring · 必填Exact Runstage model slug (gpt-image-2).
promptstring · 必填Visual description of subject, composition, lighting, and medium.
width / heightinteger · 可选Output pixel dimensions (e.g. 1024×1024 or 1536×1024).
其他参数
qualityseedenhance_prompt
复制 GPT Image 2 的 curl 示例
# 1. Free pre-run retail quote
curl -X POST 'https://runstage.dev/api/v2/quote' \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","width":1024,"height":1024}'
# 2. Submit metered job
curl -X POST 'https://runstage.dev/api/v2/run' \
-H "Authorization: Bearer $RUNSTAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "gpt-image-2", "prompt": "A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually labelled with fine leader lines, an ornate title block at the lower right reading \"CALIBRE 7 - EXPLODED VIEW\", draughtsman precision, muted sepia and slate palette", "width": 1024, "height": 1024, "seed": 42 }'
# Optional: switch to image editing (img2img) by uploading multipart -F "image=@input.png"
# curl -X POST 'https://runstage.dev/api/v2/run' -H "Authorization: Bearer $RUNSTAGE_API_KEY" --form-string 'model=gpt-image-2' --form-string 'prompt=A detailed technical cutaway illustration of a mechanical wristwatch movement, precise line-and-wash rendering on cream paper, the mainspring barrel, escapement, balance wheel and gear train all visible and individually labelled with fine leader lines, an ornate title block at the lower right reading "CALIBRE 7 - EXPLODED VIEW", draughtsman precision, muted sepia and slate palette' -F "image=@input.png"
# 3. Poll owner-scoped job result until status is "done" or "failed"
curl -H "Authorization: Bearer $RUNSTAGE_API_KEY" \
'https://runstage.dev/api/v2/jobs/<request_id>'价格
| 计费单位和选项 | 费率(美元) |
|---|---|
| Standard · 1024×1024Production square artwork (estimated) | ~$0.0845 |
| Widescreen · 1536×1024Hero & banner aspect ratio (estimated) | ~$0.0974 |
| Portrait · 1024×1536Vertical editorial & mobile layout (estimated) | ~$0.0974 |
计费说明
- Partner external model (Premium plan required). Quote via /api/v2/quote returns an estimate (is_estimated: true); settled on completion.
- 动用预付点数前,可通过 POST /api/v2/quote 免费估算运行费用。
- 任务完成或失败时按实际费用自动结算,并退回未使用的预留点数。
- 使用合作伙伴的外部算力,最终费用按报告的执行指标结算。
Runstage 的实时目录价格。使用美元预付点数,每个密钥均有支出限额。
在完整目录中比较