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
| Code | When it happens |
|---|---|
| API_KEY_INVALID | Malformed key, unknown prefix, or invalid secret |
| API_KEY_REVOKED | The key was revoked. Create a new key or rotate |
| API_KEY_EXPIRED | The key passed its expiry date |
| API_KEY_SCOPE_REQUIRED | The route requires a scope the key does not declare |
| API_KEY_PROJECT_NOT_ELIGIBLE | The project is not Studio-licensed or lacks a license |
| API_KEY_INSUFFICIENT_SCOPE | The key is missing a required scope for this route |
| UNAUTHORIZED | Missing or invalid Bearer token |
| FORBIDDEN | Authenticated but not permitted for this action |
| RATE_LIMITED | Too many requests. Retry after retry_after seconds |
