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"}]}A request whose fields are the right shape but whose meaning is wrong answers 400 with the reason as plain text, the same as Jev:
{"detail": "Too many score levels. Must have at most 10 levels."}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 |
| 400 | (text) | A question that can't be asked: no options in a choice, more than 255 options (24 on verdict-1.4), more than 10 score levels |
| 400 | (text) | An option the model doesn't support, such as images or think on laya-1.0, verdict-1.4, clm-v0.1 or jevk5-0.3, or think on clef-flash-1.0 |
| 400 | api_usage_error | An unknown model or question type |
| 404 | not_found_error | Unknown path |
| 413 | invalid_request_error | Request body larger than 8 MB |
| 422 | (list) | Invalid request body, including an unreadable or oversized image |
| 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. |
Chat completions use OpenAI's error shape instead.
Every response, including errors, carries an x-typesafe-request-id header. Include it when you contact razorback16@protonmail.com.