Error types & status codes
The API uses standard HTTP status codes to show the success or failure of a request. Errors always return:- An applicable HTTP status code (
4xxor5xx) - A JSON response body that contains:
status: the HTTP status codeerror: a human-readable error messagesupport_id: a unique reference ID that you can give to support for debugging
Common error codes
Rate limits
If your application sends too many requests in a short period, you can receive a 429 Too Many Requests error. These sources can apply a rate limit:- The infrastructure of Prem API
- Cloudflare, our edge network
- The HTTP status code 429
- A JSON response with status, error, and support_id
- An optional Retry-After header or field that shows when you can try again
Retry-After when the response has this header.
A request window with zero capacity blocks requests in its inference family. An empty window with zero refill blocks requests until its policy changes. Both return 429 with Inference request allowance exhausted. Contact us for higher limits. and no Retry-After. Do not retry this response automatically. Wait until the policy changes.
Rate limits
Read the rate limit specifications, how they operate, and how to increase them.
Best Practices
- Always check the status and error fields in responses, also for non-200 statuses.
- Log the
support_idfor every request. Show it in error reports. This helps us help you faster. - Handle
5xxerrors safely with retries and exponential backoff. - Check authentication for
401and403errors. Make sure that your API key is valid and has the required scopes. - Wait before you retry a temporary
429error. Stop automatic retries when the error says that the request allowance is exhausted.
Tips to debug errors
- Use tools such as curl, Postman, or HTTP clients with logs to examine the full request and response cycles.
- Make sure that the request goes to the correct endpoint with the correct HTTP method (
GET,POST, etc.). - Make sure that your request body matches the expected structure and content types (e.g.,
application/json). - Refer to the Authentication and API Keys pages for details about access.
support_id from the error response. This helps us solve the problem quickly.
SDK error handling
The TypeScript SDK surfaces errors from the attestation gate separately from HTTP API errors. When attestation fails, the SDK throws anAttestationError and exposes helpers to inspect it and get a user-safe message. See Attestation error handling for the full guide.