API
Errors
Errors use the format of the endpoint you called and a standard HTTP status code.
Error format
{"error": {"message": "model: no-such-model not found", "type": "not_found_error", "code": null}}{"type": "error", "error": {"type": "authentication_error", "message": "..."}}Status codes
| Status | Meaning | What to do |
|---|---|---|
| 400 | Invalid request | Fix the request body or parameters. |
| 401 | Missing or invalid API key | Check the key and auth header. |
| 402 | Key budget exhausted | Top up or raise the key budget. |
| 403 | Model not allowed for this key (videos) | Enable the model for the key. |
| 404 | Unknown model or not enabled for the key | Use an ID from GET /v1/models. |
| 409 | Idempotency conflict (videos) | Use a new client_request_id. |
| 413 | Request too large | Shorten the input. |
| 429 | Rate limited | Retry with exponential backoff. |
| 5xx | Upstream or gateway error | Retry with backoff. |
Last updated
