Skip to main content
Every model is bound to one billing unit in the pricing catalog. The unit decides what quantity is billed; the rate decides what a unit costs. Rates are operational data that track upstream costs — the units and the algorithm are fixed, and that is what this page covers.

The six units

per_ten_thousand_characters exists to match how upstream vendors quote (“per 10k characters”). Priced per single character, the rate would be so small that rounding error would exceed the fee itself. Chinese characters count as 2, Latin letters and digits as 1.

The algorithm

Unit conversion: 1 credit = ¥0.01, so credits = price in yuan × 100.
Three rules cut across every unit. 1. A floor of 1 credit. Any operation that bills at all deducts at least 1 credit — there is no “it came to 0.3, so nothing was charged.” 2. token_split rounds twice, separately, then adds. Not sum-then-round. On short turns this makes the actual deduction slightly higher than a total-based estimate, by at most 1 credit. 3. Parameter coefficients multiply on top. Some models attach coefficients to parameter tiers (resolution, quality, and so on); the final value is ceil(base × coefficient), and multiple coefficients multiply together.
When an input/output split is unavailable (a few upstreams do not report it), billing falls back to the blended rate; if no blended rate is configured, ceil((inputRate + outputRate) / 2) stands in. So the same model can estimate slightly differently depending on upstream behavior.

Cost matrix: overrides all of the above

Some models are configured with a cost matrix — a lookup by parameter combination (resolution / duration / quality / token band) yielding a yuan cost, then a margin:
Once a matrix is active, none of the rate formulas above apply; the lookup wins. This path records the matched rule and its parameter snapshot into the consumption record, so “why this price” is auditable after the fact.
When the matrix matches no rule, nothing is charged. That is a deliberate fail-open: better to undercharge than to charge arbitrarily.

No pricing configured means no charge

A computed cost of 0 means “this model has no pricing configuration,” in which case the deduction is skipped and no consumption record is written.
Do not read “this model is free right now” as a commitment. It far more likely means pricing has not been configured yet, and billing starts the moment operations fill it in. Base your cost expectations on the current rates shown in the model selector.

A worked example

One turn: 12,000 input tokens, 3,000 output tokens; model rates 4 (input) and 16 (output), in credits per million tokens.
Both terms round up to 1, so the turn costs 2 credits — against roughly 0.1 credits by a naive total-based estimate. Short turns are priced by the rounding floor, not by token count. Conversely, in long-context conversations input tokens routinely exceed output by ten to one, and cost becomes almost entirely input-driven — which is why “start a new conversation when the topic changes” saves far more than “write shorter messages.”

How to spend less

Match the model to the task

Light models for simple Q&A, premium ones for hard reasoning. Rate gaps are usually order-of-magnitude.

Keep contexts short

Every turn of a long session resends the history. Starting fresh beats trimming wording.

Narrow retrieval

Knowledge search and web scraping results all enter the context. Naming a platform and a source is cheaper than a full sweep.

Watch delegation and multi-task

Each delegation is an independent turn and costs stack. See multi-expert delegation.

Keep reading

Billing formulas

The full algorithm and credit deduction order

Credit system

Six credit sources and expiry rules

Subscription plans

Bundled credits and model visibility per plan

Limits

Hard limits across the platform