Overview
Errors
Status codes, error types and what to do about them.
Errors return a JSON body with a human-readable message and a machine-readable type.
{
"error": {
"message": "No sponsored capacity left. Sponsor capacity in the app to serve this request.",
"type": "capacity_exhausted"
}
}| Status | Type | Meaning |
|---|---|---|
400 | invalid_request_error | No messages array, or no message has text content |
401 | invalid_api_key | Missing, unknown or revoked key |
402 | insufficient_funds | The key owner's USDG balance cannot cover the request |
404 | model_not_found | No active provider serves the requested model |
429 | rate_limit_exceeded | Over the tier's requests per minute; see Retry-After |
502 | provider_error | The provider could not complete the request; you were not charged |
503 | capacity_exhausted | No sponsored capacity position has room for the request |
503 | settlement_busy | The settlement log was busy; retry |
Charging rules
Funds and capacity are checked against the worst-case cost before generation starts. A request that fails with any of the errors above is not charged. The final charge uses actual token counts.
Was this page helpful?