API reference

Errors

Errors use conventional HTTP status codes and Jev's error shapes.

Error body

Most errors look like this:

Error
{"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:

422
{"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:

400
{"detail": "Too many score levels. Must have at most 10 levels."}

Status codes

Statuserror_typeWhen
401authentication_errorUnknown or revoked key
403authentication_errorNo key sent
403permission_errorThe 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
400api_usage_errorAn unknown model or question type
404not_found_errorUnknown path
413invalid_request_errorRequest body larger than 8 MB
422(list)Invalid request body, including an unreadable or oversized image
429rate_limit_errorToo many requests per minute on one key (1,200 by default)
429quota_exceeded_errorThe free token quota is used up
529overloaded_errorAt 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.