Back to model hub
gpt-image-2

gpt-image-2

OpenAI/gpt-image-2
ImageOpenAIgpt-image-2

No introduction yet. It will appear when the API includes intro, description, or capability text for this model.

gpt-image-2 — Groups & pricing

Access groups for this site model, same-day runtime metrics, and per-resolution per-call prices from the console.

image-2

仅支持2K以下分辨率

Per call
¥0.04
image-2-Pro

支持全分辨率,最高4K质量

Per call
¥0.12
image-2-token-official

官方渠道,稳定,优质

Input / 1M tokens
¥53.20
Output / 1M tokens
¥199.50
image-2-token

支持最大4K分辨率,按量计费

Input / 1M tokens
¥11.00
Output / 1M tokens
¥42.00
image-2-pro-sp

仅限异步调用,使用前请先查看该分组文档

Per call
¥0.12

Example code & API

Call OpenAI-compatible routes below. Replace the model field with this model’s routing code and paste an API key from the console into the Authorization header.

Traffic is proxied through the unified gateway; each model type maps to a different endpoint (chat, embeddings, images, rerank, speech, etc.), and the snippets switch automatically for the current type.

In production, set sensible timeouts and retries, and keep request identifiers from responses for debugging.

curl -X POST "https://api.bananarouter.com/v1/images/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A cute baby sea otter floating on its back in soft morning light.",
    "n": 1,
    "size": "1024x1024",
    "quality": "auto"
  }' | jq -r '.data[0].b64_json' | base64 --decode > output.png