fastokens

Errors

The error envelope, every status code, and what to do about each.

Gateway errors use one envelope:

{
  "type": "error",
  "request_id": "9e1b…",
  "error": {
    "type": "rate_limit_exceeded",
    "message": "…"
  }
}

Always log request_id. Support can trace the exact request and its billing activity from it.

Status codes

Statuserror.typeMeaningWhat to do
400invalid_requestMalformed JSON or missing modelFix the request
401authentication_errorMissing or invalid tokenCheck the bearer token and its prefix (si_ vs sis_)
402insufficient_balanceWorkspace balance too lowTop up (contact us during the pilot)
402spend_cap_exceededThe API key's spend cap would be exceededRaise the cap or use another key
403(none)Your role lacks permission for the operationAsk a workspace owner or admin
404not_foundModel, customer object, or API key not foundCheck the model id and endpoint path
409conflictDuplicate registration or key conflictUse a different name
429rate_limit_exceededKey RPM or TPM limit would be exceededBack off; raise the key's limits if intended
502provider_errorThe model backend failed to answerRetry with backoff; failed calls are never billed
500pricing_error, ledger_error, report_errorInternal platform issueContact support with the request_id

Billing semantics on failure

A failed model call (provider_error) releases the balance reserve and is logged as a failed request. It never creates billable usage. Quota failures (402/429) happen before the model is called, so they cost nothing.

On this page