API reference
Errors
Errors use conventional HTTP status codes and Jev's error shapes.
Error body
Most errors look like this:
{"detail": {"error_type": "authentication_error", "message": "Cannot authenticate with the server. Please check your API key and try again."}}Validation errors (422) return a list instead, with the location and reason of each problem:
{"detail": [{"loc": ["body", "state"], "msg": "Field required", "type": "missing"}]}Status codes
| Status | error_type | When |
|---|---|---|
| 401 | authentication_error | Unknown or revoked key |
| 403 | authentication_error | No key sent |
| 403 | permission_error | The account is disabled or its email is not verified |
| 404 | not_found_error | Unknown path or model |
| 413 | invalid_request_error | Request body larger than 512 KB |
| 422 | (list) | Invalid request body |
| 429 | rate_limit_error | Too many requests per minute on one key (1,200 by default) |
| 429 | quota_exceeded_error | The free token quota is used up |
| 529 | overloaded_error | At capacity. Retry after retry-after seconds. |
Every response, including errors, carries an x-typesafe-request-id header. Include it when you contact support@codiv.ai.