Skip to main content

Long input and prefix cache

This document describes the long-input tiered coefficients and prefix cache conversion rules of throughput reservation, the TPM capacity calculator, capacity consumption and cache hit fields, and FAQs. It applies to throughput reservation in both standard mode and high-speed mode.

Capacity conversion

The input/output kTPM you purchase (1 kTPM = 1,000 Tokens per minute) is deducted based on converted consumption rather than the raw token count: purchasing 200 kTPM does not mean you can consume 200K raw tokens per minute.
  • Long input: The portion of input that exceeds the tier boundary is amplified by the long-input tiered coefficient when counted—a 50K input may consume 86 kTPM of quota.
  • Prefix cache: Input prefixes repeated across requests are cached and reused; the hit portion is counted at a discount via the cache conversion coefficient—the same 50K input may consume only a few dozen kTPM.
To determine whether the capacity you purchased is sufficient, you must look at the converted numbers. This page answers four questions in order (applicable to both standard mode and high-speed mode):
折算规则 → 容量估算 → 调用后查看实际消耗 → 控制台查看折算用量

Conversion rules

First, three terms: prefix cache refers to the system caching identical input prefixes across requests for reuse by subsequent requests; when a request's input matches the cached content, it is a cache hit; the discount multiplied into the hit portion when counting consumption is the cache conversion coefficient. The two types of coefficients apply to different portions of the input:
  • Cache conversion coefficient: Applies only to input tokens that hit the cache, counted at a discounted rate (for example, with a coefficient of 0.2, 30K hit tokens count as only 6 kTPM).
  • Long-input tiered coefficient: Applies only to the portion exceeding the tier boundary, counted with multiplier amplification; the portion within the boundary remains at 1x (for example, when a 50K input falls in the (32K,256K] tier, only the excess 18K is amplified by 3x). For most models, the tiers apply only to input; a few models also amplify output by the coefficient (see each model's row in the table below).
Input and output are converted separately and deducted from their respective purchased capacity. The limits and coefficients for each model are as follows (no tiers = all at 1x; for models not listed, the console display prevails):

Model

Maximum input tokens

Cache conversion coefficient

Long-input tiered coefficient

qwen3.8-max

1M

0.125

No tiers (1.0)

qwen3.7-flash-2026-07-15

1M

0.2

Same for input and output
(0,32K] 1x
(32K,256K] 3x
(256,1m] 6x

qwen3.7-max-2026-05-20

256K

0.1

No tiers (1.0)

qwen3.7-plus-2026-05-26

256K

0.2

No tiers (1.0)

qwen3.6-flash-2026-04-16

256K

1

No tiers (1.0)

glm-5.3

1M

0.25

No tiers (1.0)

glm-5.2

1M

0.25

No tiers (1.0)

deepseek-v4.1-flash

1M

0.02

No tiers (1.0)

deepseek-v4-flash

256K

0.1

No tiers (1.0)

deepseek-v4-flash-0731

1M

0.1

No tiers (1.0)

deepseek-v4-pro

256K

0.08

No tiers (1.0)

deepseek-v4-pro-0813

1M

0.1

No tiers (1.0)

kimi-k2.6

256K

0.2

No tiers (1.0)

qwen3.8-flash

1M

0.125

No tiers (1.0)

glm-5.1

200K

0.2

Input >32K 1.33x
Output 1.17x

Other models

Refer to the console

Refer to the console

Refer to the console

The following three typical models show how the coefficients translate into concrete numbers (all figures are the capacity consumption of a single request, in kTPM):
  • Long-input tiers · Qwen3.7-Flash
  • Prefix cache · GLM-5.2
  • Dual factors · GLM-5.1
A 50K input with no cache hits, calculated by splitting at the tier boundary:
  1. The portion not exceeding 32K is counted at 1x: 32K × 1 = 32 kTPM.
  2. The excess 18K is counted at 3x: 18K × 3 = 54 kTPM.
  3. Total consumption 32 + 54 = 86 kTPM.
The same 50K input, with the first 30K hitting the cache (cache conversion coefficient 0.2):
  1. The hit 30K falls within the 1x tier and is further multiplied by 0.2: 30K × 1 × 0.2 = 6 kTPM.
  2. The 2K within the first 32K that missed the cache is counted at 1x: 2K × 1 = 2 kTPM.
  3. The excess 18K is counted at 3x: 18K × 3 = 54 kTPM.
  4. Total consumption 6 + 2 + 54 = 62 kTPM, about 28% less than without cache.

Capacity estimation

Before purchasing, use the TPM capacity calculator to estimate the required capacity: enter your expected business workload to get the recommended input/output kTPM to purchase.
ParameterWhat to enterEffect on the recommended values
Requests per Minute (RPM)Number of requests per minute during business peak hoursThe higher the RPM, the larger the recommended input/output values
Average Input Length (tokens)Average input tokens per requestThe longer the input, the higher the recommended input value
Average Output Length (tokens)Average output tokens per requestThe longer the output, the higher the recommended output value
cache hit ratioExpected proportion of requests hitting the prefix cacheOnly lowers the recommended input value; does not affect the recommended output value
The calculator estimates based on raw tokens and does not include the amplification from the long-input tier factors — if your inputs commonly exceed 32K, scale up the recommended values yourself according to the conversion rules on this page.
TPM 容量计算器参数表单

View consumption in the console

On the throughput reservation page of the Model Studio console, expand the target model card. The Overview and monitoring tabs show how converted consumption is running:

Overview: utilization and overage degradation

使用率趋势(以折算容量观测)与超额降级统计
  • Utilization Trend: after you turn on the Observe by converted capacity switch, the curve shows the consumption calculated with the conversion method on this page. Three statistics modes:
    • Observe by purchased capacity: uses purchased capacity as the baseline, for checking whether the purchased amount is sufficient.
    • Observe by converted capacity: uses converted capacity as the baseline, reflecting the actual effect of long-input and cache conversion.
    • Include overflow usage: additionally counts the usage that overflows to pay-as-you-go billing.
  • Overage Degradation Statistics: the number of times converted consumption was degraded after exceeding the purchased capacity — long input amplified by tiers is a common cause of overage degradation.
Utilization above 100% means converted consumption has exceeded the purchased capacity; the excess is handled under the overflow policy (see the FAQ below), and it does not mean the service is unavailable.

Monitoring: cache hits

监控·缓存命中量与缓存命中率(额度内 18.82K / 63.42%)
The cache hit volume and cache hit ratio curves are used to confirm the actual benefit of the prefix cache. For more monitoring metrics, see Monitoring & Alerts.

View actual consumption via API

After you make calls using the dedicated model code, three fields in the response respectively indicate: whether the reserved capacity was hit, how much converted capacity was consumed, and the cache hit status:
FieldDescription
service_tierBilling method for this request: ptu_default = consumed standard-mode reserved capacity, ptu_fast = consumed high-speed-mode reserved capacity, null or not returned = reserved capacity not hit, pay-as-you-go billing
provisioned_tokensNumber of reserved capacity tokens consumed by this request; already the converted value (including long-input tiers and cache conversion)
cached_tokensNumber of input tokens that hit the prefix cache; greater than 0 means the cache is in effect; for the mechanism and limits, see context cache
The JSON paths of the fields differ under these four protocols:
  • OpenAI Chat compatible
  • OpenAI Responses
  • Anthropic-compatible
  • DashScope native
FieldJSON Path
cached_tokensusage.prompt_tokens_details.cached_tokens
provisioned_tokens (Input side)usage.prompt_tokens_details.provisioned_tokens
provisioned_tokens (Output side)usage.completion_tokens_details.provisioned_tokens
service_tier is a top-level field in the response body.
For the complete definitions of response fields for each protocol, see Throughput Reservation API Reference.

FAQ

The request no longer consumes reserved capacity: under the automatic overflow policy, it automatically switches to the pay-as-you-go billing method; under the reserved-capacity-only policy, a 429 rate limiting error is returned. For each model's limit, see the Maximum input tokens column in the coefficient table above.
Utilization = converted consumption ÷ purchased capacity. The long-input tiered coefficients can amplify a 50K input into a converted value such as 86 kTPM; when the converted consumption rate exceeds the purchased capacity, utilization goes above 100%, and the excess automatically switches to the pay-as-you-go billing method (or returns 429 according to the policy). In this case, you should scale up capacity, or improve the cache hit ratio to reduce converted consumption.
Check cached_tokens in the response: a value greater than 0 means part of this input hit the cache, and the hit portion is billed at a discount based on the model's cache conversion coefficient (see Conversion rules for coefficients); the cache hit ratio curve on the console monitoring tab shows the long-term trend.
Check in order: whether the input prefix is consistent across requests (for example, whether the System Message was modified), whether the interval between two requests exceeds the cache validity period, and whether the number of input tokens in a single request is sufficient to trigger the cache. For complete limits and troubleshooting methods, see Context cache.