What a 402 means, when a request is charged, why a balance can go below zero, and what happens when a request fails.
Everything on this page describes enforced platform behavior — not best-effort intentions. If you observe something different, report it.
402#A 402 names the limit that stopped the request in error.metadata.limit_source (see Errors):
limit_source | Means |
|---|---|
wallet | Your balance is at zero or below |
key | The key has spent its cap |
guardrail | A guardrail on the key has spent its budget |
GET /v1/credits; a key's cap and what is left of it at GET /v1/key.After it has run — never before. Nothing is set aside up front:
402 and no model is called.A stream you cancel settles at what the provider charged up to that point.
A request admitted while your balance was above zero is settled in full, even if its cost takes the balance below zero. That is the only way a balance goes negative, and the hole is never more than the requests already running when it crossed zero.
402 until you deposit./v1 answer that is not streamed carries X-Balance-Available: your balance after that request's charge, in micro-DA. A stream carries none — it settles when it ends; read the balance on your next call or at GET /v1/credits.Deposit confirmation is idempotent: the same order can be confirmed any number of times (page refresh, bank redirect replay) and credits exactly once. A deposit that first failed and later succeeds on retry credits the same record — you'll never see duplicates or double credits.
429 errors#Your API key has no cap on the number of requests. Two things return 429:
| Source | Shape | What to do |
|---|---|---|
| The model's provider is limiting its rate | via the API: error_type rate_limit_exceeded, with Retry-After and the provider's X-RateLimit-* headers when it sent them | Wait the Retry-After seconds, or pick another model — you are not charged for these |
| The chat's own limit | in chat, past 30 messages per minute | Wait a minute |
Chat conversations are limited to 30 messages per minute per account across all models.
A failed request is charged what its provider charged for it — usually nothing. A model error, a rate limit or an outage with no output costs 0 DA; a request refused before any model ran (a 402, a guardrail's 403, a bad request) costs 0 DA. A stream cut partway is charged for what was generated before the cut. Every charge you do see maps to a ledger entry in Dashboard → Activity with the exact DA amount.