GreenTokens

Search

Search models, guides, docs and the FAQ.

Learn··7 min read

How does AI API pricing work? Tokens, images and video

AI APIs don't charge per request or per month. They charge for exactly what each request consumes. Once you know the units, you can estimate any bill before you write a line of code.

AI API pricing can look complicated: dozens of models, each with several prices, quoted per million of something. Underneath, it follows a few simple rules. This guide explains how text, image and video models are billed, which factors really drive the cost, and how to estimate a workload with a calculator and five minutes.

Usage-based pricing

Almost every AI API bills by usage: you pay for what each request consumes, not for a seat or a flat plan. Heavy users pay more, light users pay less, and a request that fails early costs little. The unit of usage depends on the type of model.

Text models: priced per token

Language models are billed per token, a small piece of text averaging about three quarters of an English word. Prices are quoted per million tokens, with several rates per model:

  • Input tokens: everything you send, including instructions, history and documents.
  • Output tokens: everything the model writes, including any reasoning tokens. Usually around five times the input price.
  • Cache writes: repeated content stored for reuse, priced slightly above input.
  • Cache reads: stored content reused on later requests, priced at a fraction of input.

For example, Claude Sonnet 5 at GreenTokens prices costs $1 per million input tokens, $5 per million output tokens and $0.10 per million cached input tokens. Prompt caching explains the cache prices in detail.

Image models: priced per image

Image generation is usually billed per image, with the price set by output size. GreenTokens groups image sizes into tiers by the longest side: 1K up to 1,280 pixels, 2K up to 2,048, and 4K up to 4,096. Today, image models such as Grok Image 2 cost $0.015 per image. The image API docs show how sizes are chosen.

Video models: priced per second

Video generation is billed per second of output, with the rate set by the model and resolution. On GreenTokens, Seedance 2.0 Mini costs $0.054 per second at 720p, so a five-second clip costs $0.27. Grok Imagine Video 1.5 starts at $0.0084 per second at 480p. Because video jobs run for a while, the maximum cost is held from your balance when the job starts and settled at the actual length when it finishes. See the video API docs.

What really drives the bill

  1. The model tier. Prices differ by over a hundred times between the cheapest and the most expensive models, so this outweighs everything else.
  2. Output length. Output is the expensive side of every request; long answers and heavy reasoning add up quickly.
  3. Growing context. APIs are stateless, so conversations and agents resend their history on every turn, and each turn costs more than the last.
  4. Retries and loops. Failed attempts, automatic retries and runaway agent loops all consume tokens.
  5. Volume. A cost that's negligible per request becomes significant at millions of requests.

How to estimate a monthly bill

You need four numbers: requests per month, average input tokens, average output tokens, and the model's prices. Then:

Monthly cost = requests × (input tokens × input price + output tokens × output price) ÷ 1,000,000

For 100,000 requests a month, each with 2,000 input tokens and 500 output tokens, on Claude Sonnet 5 at GreenTokens prices: 100,000 × (2,000 × $1 + 500 × $5) ÷ 1,000,000 = $450. The same workload on GPT-5.6 Luna costs $90, and on GPT-6 Astra $1,800. Our LLM API pricing comparison runs this calculation across twelve models.

Measure the real averages

Estimates are only as good as their inputs. Run a sample of real requests and read the token counts from the usage each response returns, rather than guessing from word counts.

Prepaid, postpaid and subscriptions

  • Postpaid: you're billed monthly for what you used. Convenient, but a spike isn't visible until the invoice arrives.
  • Prepaid: you top up a balance and usage draws it down. Spending can never exceed what you've added. GreenTokens works this way, with no subscription and a $20 minimum top-up.
  • Subscriptions: a flat monthly fee, common for chat apps. They generally don't include API access for your own software.

List prices and discounted prices

Each model has an official list price set by its provider. Some platforms resell access at that price or add a markup; others offer the same models below list. On GreenTokens most flagship and mid-tier models are 40 to 60% below list, and the models page shows both prices side by side so the difference is easy to verify.

Keeping costs predictable

  1. Set daily and monthly spend limits on every API key.
  2. Cap output with max_tokens on every request.
  3. Cache stable prompt content, and trim conversation history.
  4. Use a cheaper model wherever it performs well enough.
  5. Review usage by model and by key each week.

Common questions

Are reasoning or thinking tokens billed?

Yes. Models that reason before answering generate extra tokens while they think, and these are billed as output tokens even though you may not see them in the final text. Reasoning-heavy tasks can therefore cost noticeably more than the answer's length suggests.

Can I cap how much I spend?

Yes, in two ways. A prepaid balance means you can never spend more than you've added. On top of that, GreenTokens lets you set daily and monthly spend limits on each API key, so one application or agent can't use up the whole balance.

In short

AI APIs charge for what you use: tokens for text, images for image models and seconds for video. Output costs more than input, cached input costs far less, and the model tier matters more than anything. Multiply your volume by the per-request cost, measure real token counts, and set limits, and your AI bill becomes as predictable as any other.

Pay less for the same models

Compare our prices with the official ones, then switch with one base URL.

Read next