Credits and billing
The wallet balance is the credit used for calls. Model Square prices decide how a request converts into credit. The usage row is the settled result.
The credit unit
The wallet, Usage Logs, and Model Square show amounts in yuan (¥). The ledger still stores an integer credit. The code default is 500000 credits = 1 US dollar, and the page converts that into yuan. Pay, balance, and per-call charges are the yuan figures on the page. Do not multiply by an exchange rate yourself.
How one request is charged
The gateway estimates the credit for this call. If the wallet or subscription cannot cover it, the call fails with HTTP 403, code insufficient_user_quota, and a message about insufficient user quota or a failed pre-charge. Upstream is not called.
The request is sent only after the reserve succeeds. A failed request refunds the reserve.
On success the gateway charges actual usage. It debits more if the reserve was low and refunds the difference if the reserve was high. Usage Logs show the settled amount.
The default preference is Subscription First (subscription_first). With no active subscription, the wallet is charged. With one, subscription credit is used first, and a shortfall falls back to the wallet only when that subscription allows it. See Subscriptions. The wallet can also switch to Wallet First, Subscription Only, or Wallet Only.
A key can also have its own remaining credit. When that key balance is used up the result is 401 and an invalid-token message, which is not the wallet's 403.
What changes the amount
- Input, output, and cache tokens. A longer context costs more input. An agent resends history and tool results.
- The group ratio. The same model can settle differently in another group.
- Image count, media duration, and resolution, only when that model bills those units. Extreme counts are rejected at validation. They are not stored as a negative charge.
Do not assume an extra unit is billed when Model Square does not list it. Use that model's page and this request's log.
Check one charge
Do not share a test key with production.
Look at the clock before you send.
Filter Usage Logs by time, key, and model. Drawing and video tasks may be in the task log, not the chat log.
Confirm the charge used the model ID you selected, not a name the client substituted.
If a charge looks high, check whether the full history was sent again or whether an agent called tools repeatedly. The token counts in the log are the settlement basis.
Where new credit comes from
Online top-ups and redemption codes both add wallet credit. Minimums and refunds are on Top up and redeem.
Model prices are on Model Square. Registration does not include a credit gift. The minimum top-up is whatever the wallet shows. Reconcile against the confirmation page and the yuan amounts in Usage Logs.