Getting started & costs

How to find the cheapest image generation API

The cheapest image API is the one that delivers an accepted asset for the least settled money, not the one with the lowest headline price. On apiToken.sale GPT Image 2, Flare and Sunburst already carry the same flat 50% B2C discount, so the decision comes from request shape, retries and acceptance rate.

·

Compare cost per accepted image

GPT Image 2, GPT Image 2.5 Flare and GPT Image 2.5 Sunburst use the same OpenAI Images endpoints, key and prepaid balance. Flare is the faster everyday option; Sunburst targets more precise edits. Compare the models on your own accepted outputs. All three use the same published token rates.

Official rates per 1M tokens are $5 for text input, $8 for image input and $30 for image output. Cached text and image input cost $1.25 and $2 per 1M respectively. Regular B2C accounts pay 50% of the official total; B2B uses negotiated rates. These are token rates, not fixed prices per image.

See also: How image generation API pricing actually works

Budget from measured token usage

Usage per 1M tokensOfficialRegular B2C · 50% off
Text input$5$2.50
Cached text input$1.25$0.625
Image input$8$4
Cached image input$2$1
Image output$30$15

For example, an edit with 900 fresh text-input tokens, 1,200 fresh image-input tokens and 4,000 image-output tokens costs $0.1341 officially, or $0.06705 at the regular B2C rate. These token counts are an example, not a promise for each picture. Use the final usage and matching request charge for your own measurements.

For a catalog or batch, divide all settled charges by the number of accepted assets. Include paid outputs that failed review. GPT Image has no free countTokens estimator: measure a small funded sample and set a spending limit before starting the queue.

Generate and edit with one key

Send a Bearer key to POST /v1/images/generations on router.apitoken.sale. Choose gpt-image-2, gpt-image-2.5-flare or gpt-image-2.5-sunburst. The default response contains PNG bytes as data[0].b64_json; decode, validate and store them yourself.

curl https://router.apitoken.sale/v1/images/generations \
  -H "Authorization: Bearer $APITOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-image-2.5-flare","prompt":"A studio photo of a ceramic mug","n":1,"quality":"low","size":"auto"}'

POST /v1/images/edits accepts one to five PNG, JPEG or WebP reference files, each up to 50 MB, as image or image[]. Use the same model IDs as generation. The multipart mask field is ignored; use the Responses image_generation tool for region inpainting. Check geometry, labels and product identity before accepting an edit.

Size controls steer proportions, not exact pixel dimensions. Higher quality values do not guarantee a higher native quality tier. The dedicated Images endpoints return base64 data; jpeg/webp output is a local conversion from the native PNG. Read the model guide before relying on a control.

Run a fair per-asset cost benchmark

  1. 01Pick 20–50 representative briefs from the real workload and write pass/fail criteria before any generation runs.
  2. 02Give each model equivalent inputs: same resolution class, same references, same maximum number of attempts per brief.
  3. 03For every paid attempt record the request ID, terminal usage, latency and your pass/fail verdict next to the returned asset.
  4. 04Divide total settled charge — including rejected outputs — by accepted assets, and compare the distributions, not the single best image.
  5. 05Repeat the benchmark whenever prompts, target resolution, reference count or the provider catalog changes materially.

Savings tactics that quietly raise the bill

  • Counting only successful outputs while hiding paid rejects, moderation failures and timed-out retries from the cost per accepted asset.
  • Burning image-model tokens on text-only planning or prompt rewriting that a cheaper text model handles before the image call.
  • Retrying automatically after a delivered response, or retrying without a fixed total attempt budget per brief.
  • Publishing one permanent 'cheapest' verdict while live catalog availability and per-workload quality keep moving.

Prepaid API usage

  • Top up in whole-dollar amounts by bank card or cryptocurrency; the prepaid balance never expires.
  • Give the benchmark its own API key with a lifetime spending limit so a retry loop cannot drain the account.
  • Keep the winning configuration pinned: model, size, references and maximum attempts — and re-test after catalog changes.

Prepaid plans: any whole-dollar amount, balance never expires →

Frequently asked questions

Does a rejected image still cost money?

Yes, if the provider delivered output and terminal usage settled. Your quality rejection does not reverse the provider's work, so paid rejects belong in the cost per accepted asset — ignoring them is the most common way 'cheap' workflows turn expensive.

Can I publish one permanent 'cheapest image API' verdict?

No. The verdict is a property of your workload at a point in time. Re-run the benchmark after material changes to prompts, output size, reference count, catalog availability or provider behavior — and date every published claim.

Is there a free GPT Image token estimator?

No. Read the published token rates, set a key spending limit, then measure a small paid sample. Final usage determines the charge.

Do GPT Image 2, Flare and Sunburst have different token rates?

All three share the published rates: $5 text input, $8 image input and $30 image output per 1M tokens, before the regular B2C 50% discount. Compare actual usage and accepted outputs.

Create an account, top up your balance, and generate an API key to use supported Claude, GPT and Gemini models.