---
title: Image Generation API Pricing: Rates and Discounts
description: "Image generation API pricing explained: usage legs, official token rates, fixed 1K/2K/4K image costs, cached input and the 50% B2C discount."
url: https://apitoken.sale/docs/learn/image-generation-api-pricing
language: en
---

# How image generation API pricing actually works

No image API sells an honest per-picture price: every request settles as metered usage legs, and the account's pricing policy applies to that exact official total. The unit worth budgeting is cost per accepted asset, including retries and rejected outputs.

## Image APIs bill usage legs, not pictures

Both published image models on apiToken.sale — Nano Banana 2 (gemini-3.1-flash-image) and GPT Image 2 (gpt-image-2) — bill the same way: text input, optional reference-image input, cached input where the provider recognizes it, and image-output tokens are metered at official rates, and then the account's policy is applied to that exact official total. For a regular B2C account the policy is a flat 50% off, so the legs below are the entire pricing story.

| Component | Nano Banana 2 | GPT Image 2 |
| --- | --- | --- |
| Model ID | gemini-3.1-flash-image | gpt-image-2 |
| Prompt/text input | $0.50/M official | $5/M official |
| Reference image input | input tokens at model rate | $8/M official |
| Rendered image | $60/M image tokens; fixed counts by size: 747 (0.5K), 1,120 (1K), 1,680 (2K), 2,520 (4K) | $30/M actual image-output tokens from terminal usage |
| Cached input | no image-model input discount | 25% of fresh: $1.25/M text, $2/M image |
| Regular B2C here | 50% off exact official total | 50% off exact official total |

[Live model catalog with per-model token rates](/models)

## Price the exact request and response shape

The two models follow the same pricing rule but are reached through different protocols. Nano Banana 2 uses the native Gemini generateContent shape with the x-goog-api-key header and takes output size as an explicit imageSize control (0.5K/512, 1K, 2K or 4K) plus an aspect ratio. GPT Image 2 uses the OpenAI Images routes with Authorization: Bearer and the published controls background opaque or transparent, quality low and size as a proportion (auto, 1024x1024/1:1, 1536x1024/3:2, 1024x1536/2:3, 4:3, 16:9, 9:16); edits go to /v1/images/edits with one to five PNG, JPEG or WebP references (each ≤50 MB).

```
curl https://router.apitoken.sale/v1beta/models/gemini-3.1-flash-image:generateContent \
  -H "x-goog-api-key: $APITOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"A studio photo of a ceramic mug"}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"],"imageConfig":{"imageSize":"1K","aspectRatio":"1:1"}}}'

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

> The response shapes differ too: Nano Banana 2 returns the picture as an inlineData image part, GPT Image 2 as one non-streaming base64 PNG. In both cases a delivered response is settled usage — there is no free preview call that returns pixels.

## Worked cost math on the published rates

Nano Banana 2 makes the arithmetic fully predictable. A 1K render is fixed at 1,120 image tokens: 1,120 × $60/M = $0.0672 official, or $0.0336 after the B2C half. A 400-token prompt adds 400 × $0.50/M = $0.0002, so the whole request settles at about $0.0674 official and $0.0337 payable. The same fixed legs price 2K output at $0.0504 and 4K at $0.0756 after the discount. Text or thinking output and grounding, when used, remain separate legs in terminal usage.

GPT Image 2 keeps the legs variable, so work through an example and then measure. Suppose a product edit sends 900 fresh text input tokens ($0.0045 official), one reference that tokenizes to 1,200 fresh image input tokens ($0.0096), and returns 4,000 image-output tokens ($0.12). The official total is $0.1341 and regular B2C pays about $0.0671. Your real request will differ — terminal usage, not this arithmetic, is the billing authority.

The unit the business should budget is cost per accepted asset: all settled request charges, including rejected outputs, divided by accepted assets. If 60% of the 1K Nano Banana 2 candidates above pass review, each accepted asset really costs about $0.0337 ÷ 0.6 ≈ $0.056. A workflow that looks cheap per token but needs three or four attempts per keeper loses to a nominally pricier model with a higher acceptance rate.

## Account class decides what the same usage costs

| Account class | Pricing rule |
| --- | --- |
| Regular B2C | Global 50% discount on the exact official total, then any more-specific valid rule |
| B2B | Only its negotiated provider/model policy |
| OpenKeys | Official 1:1 pricing; no B2C discount |
| Service | Meter-only; no customer charge |

Charges draw down a prepaid balance rather than an invoice. Accounts created with Google or GitHub start with a $5 platform bonus credit that is spent before any paid balance — enough for countTokens estimates and several bounded image generations. Top-ups accept any whole-dollar amount by bank card or cryptocurrency, and the balance never expires.

> A discount changes the payable amount, not model availability. Always discover the model with the same key before building a budget or publishing an availability claim.

[How prepaid billing, the $5 bonus and key limits work](/docs/learn/how-billing-works)

## Budget a campaign you can defend

1. Discover the exact image model and its protocol with the production key.
2. Estimate input for free: countTokens on gemini-3.1-flash-image for Nano Banana 2, or one bounded real request with terminal usage for GPT Image 2.
3. Cap the request shape: output size (1K/2K/4K or auto), reference count and maximum attempts per asset.
4. Record terminal usage, request ID and the discounted charge for every settled attempt, and reconcile them against the dashboard ledger entry.
5. Measure acceptance rate on a representative set, multiply cost per accepted asset by forecast volume, and set the key's lifetime spending limit below that budget with an alert before exhaustion.

- Default to 1K and promote only assets that fail a delivery-resolution check: after the discount the 4K image leg ($0.0756) costs 2.25× the 1K leg ($0.0336).
- Send only references that constrain the result — every reference is billable image input.
- Replace endless prompt retries with a fixed visual checklist and a hard attempt budget per asset.
- Do not count on caching for Nano Banana 2 input: this image model bills cached input at the full rate, while GPT Image 2 cached input settles at 25% of fresh.
- Give each image workload its own key and lifetime spending limit so one campaign cannot consume the whole account balance.

## Frequently asked questions

### What is the cheapest way to estimate an image request?

For Nano Banana 2, countTokens estimates input on gemini-3.1-flash-image without generating an image; add the fixed output leg for 0.5K, 1K, 2K or 4K and you have a full pre-generation price. GPT Image 2 has no equivalent estimator, so an authoritative total requires one bounded real request and its terminal usage.

### Does 50% off mean every picture costs half a fixed list price?

No. The policy halves the exact official usage cost for regular B2C. Nano Banana 2 has a predictable image leg by size — $0.02241, $0.0336, $0.0504 and $0.0756 for 0.5K, 1K, 2K and 4K — while GPT Image 2 keeps variable terminal token usage, so only its input rates, not a per-picture total, can be stated in advance.

### Should failed images be included in the budget?

Yes. If a request delivered output and settled usage, its charge is part of acquisition cost even when the asset fails your quality check. Divide total settled spend by accepted assets — that ratio, not the rate card, is what a campaign actually costs.

### Where do I verify the final image charge?

Use terminal provider usage together with the matching dashboard ledger entry for that request ID. Do not infer money from PNG file size, pixel dimensions or partial output — none of them is the billing formula.

### Can I test image generation pricing without spending money?

Mostly yes. Accounts created with Google or GitHub receive a $5 platform bonus credit that is spent before any paid balance, and countTokens estimates Nano Banana 2 input for free. The only step that always costs is the first real generation — keep it bounded at 1K or quality low and cap the key with a lifetime spending limit.

---
Get a key: https://apitoken.sale/register
More guides: https://apitoken.sale/docs/learn
