Skip to main content
GET
Model Pricing API
Examples use qwen3.8-max, but the data.pricing shape is shared by all TokenPricingV2 models.
Model behavior and billing rules: qwen3.8-max guide.
This endpoint does not require authentication. Do not send Authorization.

Request parameters

string
required
Model ID, e.g. qwen3.8-max. Required; omitting it returns 400 Missing model parameter.

Read only data.pricing

The response may include several overlapping price blocks — frontends should only use data.pricing: token_price may omit fields like explicit_cached_input, so estimates run high. New billing dimensions are added only under pricing.

rates vs effective_rates

Use effective_rates for UI prices — do not multiply yourself. Use rates only when showing list price alongside.
group is often default: public pricing pages quote default. A user’s real charge uses their group and may be lower than the displayed price.
rates / effective_rates use usd_per_million_tokens (USD per 1M tokens).

Tool prices: extras.tools is list price only

Asymmetry in the current API:
Respect unitdo not hardcode “per 1k calls”:

Three-state field semantics

Examples:
  • Missing output_thinking → single output rate; do not render “thinking is free”. For qwen3.8-max, thinking cannot be disabled and there is one output price.
  • Missing extras.google_web_search → Vertex-only; Bailian-style search is under extras.tools.web_search.
  • Tool with price: 0explicit free (e.g. promo); show free.

Multi-tier: only tier_count

Tier rule: pick one tier from total input tokens of the request, then price the whole request at that tier (not progressive). Values in tiers are list prices — multiply by price_factor.
Do not use billing_type === "tiered_token" to detect multi-tier pricing — single-tier models can still use that value. Only trust tier_count.

limits (not prices)

  • supports_cache_*: capability flags; if false, do not present cache rates as available even if present in rates.
  • max_output_tokens: pre-charge style cap when max_tokens is omitted — not a price.

TypeScript types

Tool row helper

Common mistakes

Request examples