Image model by OpenAI

GPT Image 2 API

model: gpt-image-2

Call GPT Image 2 with your KeelRouter API key, the same key you use for every other model. From $0.019 per image, paid per call from a prepaid balance. Failed calls are free.

Pricing

OptionPrice
1K$0.019 per image
2K$0.055 per image
4K$0.088 per image

Call it

Async: POST /v1/images/generations returns a taskId; poll the same path with ?task_id= or pass a callback_url.

curl https://api.keelrouter.com/v1/images/generations \
  -H "Authorization: Bearer $KEELROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "prompt": "A lighthouse at dawn, watercolor",
  "resolution": "1K"
}'

Parameters

NameTypeNotes
modelstringRequired. gpt-image-2
promptstringRequired.
aspect_ratiostringOne of auto, 1:1, 2:3, 3:2, 4:5, 5:4, 4:3, 3:4, 16:9, 9:16, 21:9. Default auto.
resolutionstringOne of 1K, 2K, 4K. Default 1K.
image_urlstring
image_urlsarray
output_formatstringOne of png, jpeg, webp.
callback_urlstringOptional https URL; we POST the result when the task ends

FAQ

How much does the GPT Image 2 API cost on KeelRouter?
From $0.019 per image. You pay per call from a prepaid USD balance; failed calls are not charged.
How do I call GPT Image 2?
POST to /v1/images/generations with model "gpt-image-2". You get a taskId back; poll the same endpoint with ?task_id= or pass a callback_url.
Is this the official GPT Image 2 API?
No. KeelRouter is an independent API gateway. Requests run on GPT Image 2 through our upstream providers, and the image model keeps its own safety filters.
How long are results kept?
Result files are kept for 30 days, then deleted. Download what you want to keep.

More from OpenAI

KeelRouter is an independent service and is not affiliated with OpenAI. GPT Image 2 is a trademark of its owner, used here only to name the model a request runs on.