Error Codes

Every error uses the same envelope. Inspect error.code for programmatic handling and error.message for a human-readable explanation.

Error shape

All failures return:

{
  "success": false,
  "error": { "code": "INVALID_API_KEY", "message": "Invalid API key." }
}

Authentication errors

CodeHTTPWhen it occurs
MISSING_API_KEY401No Authorization header was provided.
INVALID_AUTH_HEADER401The header wasn't in the form 'Bearer <key>'.
INVALID_API_KEY401The key doesn't match any active key.
REVOKED_API_KEY401The key was permanently revoked.
INACTIVE_API_KEY401The key is currently disabled.
NO_ACCOUNT403The key has no associated owner account.

Request errors

CodeHTTPWhen it occurs
VALIDATION_ERROR400A required field is missing or invalid (mode, message, query, etc.).
UNSUPPORTED_FILE_TYPE400An uploaded file's type isn't supported.
FILE_TOO_LARGE400An uploaded file exceeds the size limit.
USAGE_LIMIT_REACHED402The account's usage/credit limit has been reached.
TOO_MANY_REQUESTS429The API key's daily rate limit was exceeded (see Rate Limits).

Resource errors

CodeHTTPWhen it occurs
SESSION_NOT_FOUND404The session doesn't exist in this project (or belongs to another).
FILE_NOT_FOUND404The file doesn't exist for this account.
NOT_FOUND404No such /v1 endpoint at the requested path.

Server errors

CodeHTTPWhen it occurs
INTERNAL_ERROR500An unexpected error occurred. Safe to retry.
Cross-project access always surfaces as a 404 (not 403) so the existence of another project's resources is never revealed.