Skip to content
This page is a translation of the authoritative Chinese source and may lag behind.View the original

Pricing and billing fields

The Settings page has two sub-tabs: Billing (model pricing + monthly cost) and Users & access (user and key management, see Access key and key group fields and Console user management).

Entry: Console → Settings (visible to admin and monitor). For the UI-operational steps see Configure model pricing and view monthly billing.

Model pricing — snapshot fields

Each model can have multiple price snapshots, ordered by time:

ColumnDescription
Created timeThe snapshot's effective time (hover shows the price's valid interval)
Billing modeToken billing / per-call billing / per-duration billing
Input priceUSD price per 1M input tokens
Output priceUSD price per 1M output tokens
Cache-read priceUSD price per 1M cache-read tokens
Audio input / audio output pricePrice per 1M audio tokens; if empty, audio is billed at the ordinary input/output price. Only effective under Token billing
Mode unit priceThe mode price under per-call / per-duration billing (per-call = per invocation, per-duration = per second of media duration; Token mode shows —)
Sourceauto (system auto-written from the built-in baseline or remote pricing source) or pinned (manually set in the console, yellow badge)
Statuscurrent (currently effective, green) or preset (preset / historical)
Currencydefault USD, optional CNY / EUR / JPY / GBP
Extra pricingCustom pricing dimensions as key-value pairs (e.g. reasoning_tokens)

Price effective rules

  • Multiple snapshots are sorted by created_at, each covering the interval [its own time, next one's time).
  • The earliest snapshot extends backward to cover all earlier historical periods (backfill).
  • The latest snapshot extends infinitely forward (current and future effective).
  • is_current marks the one effective at the current moment.
  • Relationship between auto and manual prices: when you manually create/edit a price snapshot (pinned) for a model, it becomes the current effective price due to its newer time, shadowing all auto rows below it — auto rows are not deleted or overwritten, but kept in the table as historical snapshots; cost calculation uses the pinned price and is unaffected. The pinned price is authoritative, and the system skips that model when refreshing, never overwriting your manual price with the baseline.
  • How auto rows update: when a model has only one auto snapshot (you haven't created a pinned price yet), if the built-in baseline or remote pricing source changes, the system updates that row in place (keeping one row, rather than appending one per baseline change). Once you've added a second snapshot (creating price history), subsequent auto changes append new rows to preserve the audit trail.
  • Deleting the pinned price: the current price falls back to the next-newest auto row; if at that point the model has only one auto row and the baseline has updated, the system updates it in place to the latest value, self-healing.

Billing modes

ModeDescription
Token billing (default)Priced by input/output token counts
Per-call billingPriced by invocation count (fixed price each), for models that don't return token usage
Per-duration billingPriced by media duration (unit price × seconds), for models like speech transcription and video generation that return only duration and no token usage. Duration seconds are collected per request into the usage extension field (duration for whisper/fun-asr, video_duration for video generation)

Monthly cost — fields

Costs broken down by month and by access key. The top summary cards show the selected month: total requests, total cost, input tokens, output tokens, cache-read tokens.

The main table lists by access key:

ColumnDescription
Access keyExpandable to view model detail
Total requests
Successful requests
Error requestsShown red when greater than 0
Input tokens
Output tokens
Cache-read tokens
CostShown per snapshot currency (per-currency detail, one row per currency), not a fixed USD column

Expanding a row shows the request count and cost detail of each model under that key. The table bottom has a total row.

Currency and conversion: cost is calculated in the snapshot's own currency, with no automatic conversion — a CNY snapshot is billed in CNY, a USD snapshot in USD. The bill is therefore split by currency; if an entry contains multiple currencies, an extra "≈ target currency" approximate total is given, converted with the exchange rate (preferring API rates, offline using local rates, both dated). Mixed-currency aggregation is a known limitation: conversion is only a display-layer approximation; for a precise single-currency bill, keep each model's pricing currency consistent.

Pricing source

Auto price rows have two sources:

  • Built-in pricing baseline (bundled with the gateway program, no config needed)
  • Remote pricing source (not exposed as an environment variable in the official image; contact support if needed)

FAQ

Q: What's the difference between auto and pinned snapshot sources? auto is a price the system auto-writes from the built-in baseline or remote pricing source; pinned is a price you manually set or modified in the console. pinned becomes the current effective price due to its newer time, shadows the auto rows below it, and the system skips that model on refresh, never overwriting the pinned price.

Q: I set a manual price — what happens to the previously auto-written row? It is not deleted or overwritten. It's shadowed by your manual price (cost calculation uses the manual price) and kept in the table as a historical snapshot and fallback point. After deleting the manual price, the current price automatically falls back to it.

Q: With only one auto price, does a baseline change append a new row? No. The system updates that single row in place; the table always keeps one row. Only after a second snapshot already exists (you created a pinned price or backfilled a historical price) do baseline changes append new rows to preserve price history.

Q: What happens when deleting a snapshot?

  • Deleting when only one remains: the model becomes "unpriced"; after refresh the system may re-fetch automatically.
  • Deleting the currently-effective one: falls back to the adjacent snapshot.
  • Deleting a historical record: permanently deleted, doesn't affect current pricing.

Q: The monthly cost seems wrong? Check whether the model pricing's snapshot time range covers the billing month. If a month has no valid price, the cost is 0.

Q: What's the difference between the three billing modes? Token billing prices by input/output token counts; per-call billing prices by invocation count (fixed price each); per-duration billing prices by media duration (unit price × seconds). The three modes are mutually exclusive, each ignoring the other modes' prices. Per-call / per-duration suit models that don't return token usage (like images, speech transcription, video generation).

Next: Configure model pricing and view monthly billing for UI steps; Statistics for usage statistics; Environment variable reference for all environment variables.