Skip to content
TutujinAPI

How LLM API pricing works: per token, per request and cached input

LLM APIs bill three ways — input and output tokens priced separately, cached input at a lower rate, and per request for image models — and the same model costs different amounts in different groups. Worked examples at live prices.

LLM APIs are priced three ways. Chat and embedding models bill per token, with input and output priced separately per million tokens. Input served from the context cache is billed at the cache-read price, which is usually much lower than normal input. Image generation and similar models bill a fixed price per request. Tutujin API balances are in CNY with no monthly fee, and the same model costs different amounts in different groups.

Three ways to bill

BillingTypical modelsHow it worksUnit
Per tokenChat, embeddings, some audio and image modelsInput tokens × input price plus output tokens × output price¥ per 1M tokens
Cache read and writeChat models with context cachingCached input is billed at the cache-read price; some models also charge a cache-write price¥ per 1M tokens
Per requestImage generation, some search modelsA fixed price per call, regardless of token count¥ per request

Models and pricing shows which way each model is billed.

Reading a price table

Here is gpt-5.4-mini in every group:

GroupInput ¥/1MOutput ¥/1MCache read ¥/1M
StandardLowest¥1.5¥9¥0.15
Azure¥1.5¥9¥0.15
Azure Plus¥2.25¥13.5¥0.225
OpenAI Direct¥3.38¥20.25¥0.338
OpenAI Direct Plus¥4.5¥27¥0.45
Official · Enterprise¥8.21¥49.27¥0.821

gpt-5.4-mini · Prices in CNY, cheapest group for each model; updated Nov 13, 2026, 6:13 PM.

  • Input: everything you send — system prompt, chat history, documents and tool definitions.
  • Output: everything the model generates, including a reasoning model's thinking. Output usually costs several times as much as input.
  • Cache read: the price for input served from the context cache; see What context caching is and how it saves money.
  • Group: the same model is priced differently per group; see How to choose a group.

Cost of one request

For token-billed models:

Text
cost = input tokens ÷ 1,000,000 × input price
     + cached tokens ÷ 1,000,000 × cache-read price
     + output tokens ÷ 1,000,000 × output price

Say a request has 3,000 input tokens and 800 output tokens. With deepseek-v4.1-flash:

Cost estimate · deepseek-v4.1-flash (China Models)

Unit price
input ¥2.8 / output ¥11.2 (per 1M tokens)
Usage per request
3,000 input tokens, 800 output tokens
Requests
1
Cost per request
¥0.0174

Total about ¥0.0174Prices in CNY, cheapest group for each model; updated Nov 13, 2026, 6:13 PM.

The same request on Claude Sonnet 5.5:

Cost estimate · Claude Sonnet 5.5 (Claude Lite)

Unit price
input ¥3.2 / output ¥16 (per 1M tokens)
Usage per request
3,000 input tokens, 800 output tokens
Requests
1
Cost per request
¥0.0224

Total about ¥0.0224Prices in CNY, cheapest group for each model; updated Nov 13, 2026, 6:13 PM.

The gap per request looks small; multiply by a month of traffic and it is not.

Cost of a month

Monthly cost = cost per request × number of requests. The same request 50,000 times a month:

Cost estimate · deepseek-v4.1-flash (China Models)

Unit price
input ¥2.8 / output ¥11.2 (per 1M tokens)
Usage per request
3,000 input tokens, 800 output tokens
Requests
50,000
Cost per request
¥0.0174

Total about ¥868Prices in CNY, cheapest group for each model; updated Nov 13, 2026, 6:13 PM.

For a budget, take about 100 real requests, average the input and output tokens from each response's usage field, then multiply by expected volume. Guessed token counts are often far off.

Per-request models

Image models charge per call, however long the prompt:

ModelVendorCheapest groupInput ¥/1MOutput ¥/1MPer request ¥
gpt-image-2OpenAIStandard——¥0.12
nano-banana-proGoogleStandard——¥0.4

Prices in CNY, cheapest group for each model; updated Nov 13, 2026, 6:13 PM.

For example, 1,000 images:

Cost estimate · gpt-image-2 (Standard)

Unit price
¥0.12 / request
Requests
1,000
Cost per request
¥0.12

Total about ¥120Prices in CNY, cheapest group for each model; updated Nov 13, 2026, 6:13 PM.

Four things that drive the bill

FactorEffectWhat to do
Model tierUnit prices can differ by tens of times between tiersUse small models for simple tasks — see How to choose a model
Input lengthLong prompts, history and documents are all billed as inputTrim prompts and history, use caching
Output lengthOutput is the expensive side, and thinking counts as outputSet max_tokens, ask for concise answers
GroupThe same model is priced differently per groupPick a group by how much stability you need

More ideas in How to control API costs.

Checking what you were charged

  • Each response's usage field returns input and output tokens, plus cached tokens when the cache was hit.
  • Logs in the console list model, group, tokens and cost for every request.
  • Billing rules in detail: Billing and usage.

FAQ

Is there a monthly fee or minimum spend?

No. Usage is deducted from your balance, which is in CNY, and you pay only for what you use.

Why does the same model cost different amounts in different groups?

Each group is a different line with different costs, so prices differ. You pick a key's group when you create it, or several in priority order, and every request is billed at the price of the group that served it.

Do I pay for a reasoning model's thinking?

Yes. Thinking counts as output tokens and is billed at the output price, so a short final answer can still cost a fair amount. Cap it with max_completion_tokens.

Can prices change?

They can. The models and pricing page shows when the price list was last updated, each request is billed at the price in effect at that time, and every charge is listed under Usage in the console.

Can I get an invoice?

Yes. We issue both China domestic invoices (fapiao) and overseas invoices; add our WeChat support JsnonoChat and send your order number.