How you are charged
What a request costs
Section titled “What a request costs”A request costs usage × unit price × rate.
- Usage: input, output, cache write and cache read tokens; models priced per request, image or second count those instead.
- Unit price: the official price listed in the Model Plaza.
- Rate: the line’s rate or your personal rate, multiplied further in peak hours and similar cases. See Reading the prices.
The amount before the rate is the original cost; what you’re charged is the billed cost. Usage shows both.
When you’re charged
Section titled “When you’re charged”- You’re charged after a request completes, for what it actually used. Nothing is put on hold beforehand.
- Failed requests are free. When the platform retries on another account behind the scenes, only the attempt that succeeds is billed.
- A stream that stops partway:
- If the upstream stops, you pay for what was produced.
- If you disconnect (closing the client, for example), the platform still receives the rest of the reply and bills the full usage, so stopping early doesn’t save money.
The balance can dip below zero
Section titled “The balance can dip below zero”The balance is checked before a request starts. If the last request costs more than what’s left, the balance ends up negative; further requests are refused for insufficient balance until you top up.
The same goes for subscription quotas: the last request can take usage slightly over the limit.
A key’s billing source
Section titled “A key’s billing source”Each key decides what it is billed to. When you create or edit a key, pick a Billing source:
| Billing source | Meaning |
|---|---|
| Balance (default) | Charged to your balance. |
| Subscription | Available when you have a subscription; charged to its quota. |
With Subscription you can also tick Use balance automatically after the subscription quota runs out or expires (off by default):
- Ticked: when the quota runs out or the subscription expires, requests move to the balance without interruption.
- Not ticked: requests the subscription can’t cover are refused, so the balance is never spent by surprise.
Key limits
Section titled “Key limits”To cap what one key can spend, set on the key:
| Limit | Meaning |
|---|---|
| Quota | The most this key can ever spend, in US dollars; 0 means no limit. |
| 5-hour / daily / 7-day limits | The most it can spend in a period. The period starts at the first charge in it and clears completely 5 hours, 24 hours or 7 days later — not on calendar days. |
| Expiry | The key stops working after this date; change the date to bring it back. |
Limits count the billed cost whether the key is billed to the balance or a subscription. When the quota is used up, raise it or reset the used amount in the Hub.
Requests in parallel
Section titled “Requests in parallel”Each account can run a limited number of requests at once; Profile in the Hub shows your “Concurrency Limit”. Requests over it wait in a queue for up to 30 seconds, then fail.
Common errors
Section titled “Common errors”| Status | Message | Cause and fix |
|---|---|---|
| 403 | Insufficient account balance or insufficient balance | Not enough balance. Top up. |
| 429 | subscription quota is used up: ... | The subscription’s quota is used up. Wait for it to reset, let the key fall back to the balance, or bill the key to the balance. |
| 403 | no active subscription: ... | No active subscription (it expired). Renew, or bill the key to the balance. |
| 403 | daily usage limit exceeded and similar | The subscription’s daily, weekly or monthly quota is reached. |
| 429 | API key quota is used up | The key’s quota is used up. Raise it or reset the used amount in the Hub. |
| 429 | API key 5-hour spending limit reached, API key daily spending limit reached, API key 7-day spending limit reached | The key’s 5-hour, daily or 7-day limit is used up. It clears when the period ends. |
| 403 | API key has expired | The key has expired. Change its expiry in the Hub. |
| 401 | API key is disabled | The key is disabled. Enable it in the Hub. |
| 429 | Too many pending requests, please retry later or Concurrency limit exceeded for user, please retry later | Too many requests at once. Retry later or run fewer in parallel. |