Skip to content

Platform API Errors and Limits

Platform API errors use a different body shape from model endpoint errors: the HTTP status carries the result, and the JSON body always includes success and, on failure, a machine-readable code.

On success, HTTP 200 is returned:

{
"success": true,
"message": "",
"data": {}
}

On failure, the real HTTP status code is used and the body includes a machine-readable code:

{
"success": false,
"message": "Invalid Management Key",
"code": "invalid_token"
}

message is localized and may change between versions. Use the HTTP status code and code in program logic.

HTTPcodeScenario
400invalid_requestInvalid parameters, such as amount out of range, missing or overlong name on create, status outside 1 / 2, enabling a Key that is still expired or exhausted, invalid expiration time, invalid pagination or time range, or an unencoded ; in the query
401invalid_tokenMissing Authorization header, malformed Key, or Key not found or deleted
401token_expiredThe Management Key has expired
401token_revokedThe Management Key was revoked (legacy Keys only; newly created Keys can only be deleted)
403user_disabledThe Management Key owner’s account is disabled
403insufficient_scopeThe Management Key does not have the permission this endpoint requires
404not_foundThe API Key does not exist or does not belong to you (not distinguished); or the path does not exist under /api/open/v1
405method_not_allowedThe path exists but does not support that HTTP method
429rate_limitedPer-Management-Key rate limit exceeded
500internal_errorServer error; internal details are not returned

Unknown paths under /api/open/v1 return 404 and a wrong HTTP method returns 405, both with the unified error body above; use code to tell “retry with another method” from “wrong path or parameters”.

RangeLimitApplies toResponse when exceeded
Per Management Key120 requests/minuteAll Platform API endpoints429 with code rate_limited
Per user30 requests/minute (default)Account logs, Export logs, Usage, Usage by model, Usage by Key429; the response body may be empty
Per client IP180 requests/180 seconds (default)Shared across all /api endpoints429
Per client IP100 requests/20 minutes (default)Sensitive endpoints such as Reveal an API Key429; the response body may be empty

Handle rate limiting by HTTP status code. When you receive 429, slow down and retry later.

Model endpoints use a different error body and separate limits; see Common Errors.