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"}]}

Status codes

Statuserror_typeWhen
401authentication_errorUnknown or revoked key
403authentication_errorNo key sent
403permission_errorThe account is disabled or its email is not verified
404not_found_errorUnknown path or model
413invalid_request_errorRequest body larger than 512 KB
422(list)Invalid request body
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.

Every response, including errors, carries an x-typesafe-request-id header. Include it when you contact support@codiv.ai.