GPT-Image 2 API
AI ImageGPT Image 2 — Text-to-image generation and reference editing, priced per image in 1K, 2K and 4K tiers. Quality does not change the price.
- Per successful call$0.02–$0.05
- OperationsText to image
- Image edit
- View tool pricing and billing rules
Your result will appear here once you run the model.
01
Where it fits
GPT Image 2 — Text-to-image generation and reference editing, priced per image in 1K, 2K and 4K tiers. Quality does not change the price.
Pick GPT-Image 2 for dependable prompt-to-image output at the lowest image price we list; move to GPT-Image 2.5 Flare or Sunburst when you need the newer 2.5 generation and an exact WIDTHxHEIGHT canvas.
02
What it does
Text to image
gpt-image-2
Turn a text prompt into a new image.
Image edit
gpt-image-2
Change an existing image from a prompt and reference input.
03
Call it
Media models run asynchronously. Create a task, poll it until it finishes, then download the signed asset URL.
# 1. Create the job. 202 Accepted; the body carries the task id,
# the pre-charged price, and a poll_url. Reuse one Idempotency-Key
# across retries so a timeout never starts a second paid job.
curl --fail-with-body https://api.omniakey.com/v1/media/tasks \
-H "Authorization: Bearer $OMNIAKEY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: gpt-image-2-001" \
-d '{
"model": "gpt-image-2",
"type": "image",
"operation": "generate",
"input": {"prompt": "a paper boat on a quiet lake at sunset"},
"parameters": {"size": "1024x1024", "quality": "medium"}
}'
# 2. Poll GET /v1/media/tasks/{id} until status is
# succeeded | failed | canceled. Progress carries percent and stage.
curl --fail-with-body https://api.omniakey.com/v1/media/tasks/TASK_ID \
-H "Authorization: Bearer $OMNIAKEY_API_KEY"
# 3. Download assets[0].url before expires_at, or poll again for a
# fresh signed URL. Failed and canceled jobs are refunded.
curl -sS -o out.png "$(jq -r '.assets[0].url' result.json)"04
Pricing
Image jobs are billed per successful call, not per token. Failed or canceled jobs are refunded automatically.
$0.02–$0.05per callSave 62%
- 1K
- $0.02per call
- 2K
- $0.03per call
- 4K
- $0.05per call
More OpenAI image models
Related articles
Seedream 5.0 Pro vs GPT Image 2: Same-Prompt Test and Price
Six jobs, the same prompts, three models: what each made and what it cost.
Read articleGPT Image 2 vs Nano Banana 2
GPT Image 2 is the simpler OpenAI-shaped route; Nano Banana 2 is the more flexible reference-image route. Choose by the request contract and accepted-task cost.
Read articleGPT-Image 2.5 vs GPT-Image 2
GPT-Image 2 costs $0.02 / $0.03 / $0.05 and the 2.5 ids $0.025 / $0.035 / $0.055 per image at 1K / 2K / 4K; quality does not change the price. The 2.5 ids add no working quality tier, and requests need an explicit WIDTHxHEIGHT.
Read articleGPT Image 2.5 vs Nano Banana 2.1: Same-Prompt Test and Price
Four prompts, three image models, one day: what each made and what it really cost.
Read articleFrequently asked questions
How do I call GPT-Image 2 on OmniaKey?
POST to /v1/media/tasks with the model id, type "image", and operation "generate" or "edit". Reuse one Idempotency-Key across retries so a timeout never starts a second paid job.
What does GPT-Image 2 cost?
GPT-Image 2 bills $0.02–$0.05 per call. Creation pre-charges that amount from your prepaid balance, and failed or canceled jobs are refunded automatically.
Why does the API return a task id instead of the image?
Provider latency runs from seconds to about a minute, so OmniaKey normalizes every image route into one asynchronous lifecycle. Poll GET /v1/media/tasks/{id} until the status is succeeded, then read the signed asset URL.
