Developer documentation

Error codes

Common API key and rate-limit responses from the RivetAI REST API.

Error format

Errors return a JSON body with a top-level error object containing code, message, and optional retry_after for rate limits.

Common codes

CodeWhen it happens
API_KEY_INVALIDMalformed key, unknown prefix, or invalid secret
API_KEY_REVOKEDThe key was revoked. Create a new key or rotate
API_KEY_EXPIREDThe key passed its expiry date
API_KEY_SCOPE_REQUIREDThe route requires a scope the key does not declare
API_KEY_PROJECT_NOT_ELIGIBLEThe project is not Studio-licensed or lacks a license
API_KEY_INSUFFICIENT_SCOPEThe key is missing a required scope for this route
UNAUTHORIZEDMissing or invalid Bearer token
FORBIDDENAuthenticated but not permitted for this action
RATE_LIMITEDToo many requests. Retry after retry_after seconds
API error codes | RivetAI Developers · RivetAI