Errors
Standard Compute uses standard HTTP status codes. Error bodies follow the format of the API you called.
Error format
On OpenAI endpoints:
{
"error": {
"message": "Your monthly compute budget is used up. ...",
"type": "insufficient_quota",
"code": "budget_exhausted"
}
}
On the Messages API:
{
"type": "error",
"error": { "type": "rate_limit_error", "message": "..." }
}
Status codes
| Status | Code | Meaning | What to do |
|---|---|---|---|
400 | model_not_found | The model ID doesn't exist. | Use standardcompute or an ID from /v1/models. |
400 | invalid_model | model is null, empty or not a string. | Send a model ID, or omit the field. |
400 | unsupported_model_input | Images were sent to a text-only model. | Use a vision model or standardcompute. |
400 | unsupported_parameter | A parameter isn't supported, such as previous_response_id. | See the endpoint's page. |
401 | The API key is missing or invalid. | Check the Authorization header. | |
402 | budget_exhausted | Your monthly budget is used up. | Wait for the date in x-sc-budget-renews-at, or add budget. |
402 | free_quota_exhausted | Your free trial credit is used up. | Choose a plan. |
402 | payment_required | A payment failed and access is paused. | Update your payment method in Billing. |
403 | company_access_denied | This company key has been disabled. | Ask your company admin. |
429 | rate_limit_exceeded | Too many requests. | Wait for retry-after seconds, then retry. |
503 | service_unavailable | The model is temporarily unavailable after retries. | Retry after retry-after, or use smart routing. |
Other 4xx errors from the model provider are passed through with provider details removed.
Retries
Standard Compute already retries provider errors before responding. When you retry:
- Retry
429and503after theretry-afterdelay, with exponential backoff. - Don't retry
400,401,402or403without changing the request or your account.
Response headers
| Header | Description |
|---|---|
retry-after | Seconds to wait before retrying, on 429 and 503. |
x-sc-budget-renews-at | When your budget resets, on budget_exhausted. |
x-sc-gated | Why a request was blocked, for example budget_exhausted or rpm_limit. |