Skip to main content
OpenPAI uses a prepaid + token-based billing model, consistent with OpenAI. This page explains how the actual charge for each call is computed.

Billing components

Every successful call produces the following usage items:
ItemMeaning
prompt_tokensInput tokens you send to the model (including system / messages / tools and everything else).
completion_tokensOutput tokens the model returns (visible content).
reasoning_tokensInvisible chain-of-thought tokens from reasoning models (only o3 / GPT-5 / Claude thinking / Gemini thinking).
cached_tokensInput tokens that hit the prompt cache.

Charging formula

charge =
    (prompt_tokens     × input price)
  + (completion_tokens × output price)
  + (reasoning_tokens  × output price)
  + (cached_tokens     × cache price)
  × user group multiplier
Where:
  • Input / output / cache prices come from each model’s official pricing, converted to RMB as USD price per million tokens × OpenPAI multiplier × exchange rate.
  • User group multiplier: determined by your account’s group; see Core concepts.
  • Cache price is typically 0.1× to 0.5× of the input price; see Cache billing.

Console log example

After a call, the Logs page shows token and billing details (without prompt / response content):
FieldExample
Modelgpt-5.5
Input / output / cache / reasoning tokens1024 / 512 / 800 / 0
Multiplier1.0×
Actual charge¥0.0034
Request IDreq_01ab...

Billing by model type

Charged by prompt_tokens + completion_tokens. If prompt caching is used, the cache-hit portion is settled at the cache price.
reasoning_tokens are billed additionally at the output price (invisible but they consume compute). The console log breaks out thinking vs. answer tokens.
Charged by prompt_tokens (input) only; there is no output.
Charged by number of images + size, a fixed charge per call.
TTS is charged by input character count; Whisper is charged by audio duration (seconds).
Asynchronous task model, charged by number of tasks + action type. Failed tasks are not billed.
Charged by the total tokens of (query + all documents).

Are failed requests billed?

SituationBilled?
4xx client error (bad params, auth failure)❌ Not billed
5xx upstream error that auto-retries successfully✅ Billed for the successful attempt
All channels fail, client finally gets a 5xx❌ Not billed
Streaming response disconnects midwayBilled by tokens actually generated
Client abortBilled by tokens the upstream already generated

Out of balance

When account balance ≤ 0, all paid model calls immediately return insufficient_quota (HTTP 403). Some free models (such as Moderations) remain usable.

Check your spend

Price changes

  • New models: launched at the official price converted at integration time.
  • Official price changes: OpenPAI follows the upstream, announced 24 hours in advance in the console.
  • Price cuts / promotions: pushed from time to time, subject to the console banner.

More

Quota & tokens

Account quota, token quota, expiry and transfers.

Cache billing

OpenAI / Claude / DeepSeek prompt-cache details.