API key errors now return 401 with the standard error envelope
If a request has a missing, invalid, or disabled API key, the API now returns 401 with the same error envelope as every other error:403 with a bare {"message": "Forbidden"} body.Unknown routes now return 404
A request to a path that doesn’t exist now returns 404 with the code not_found. The details object shows the method and path you called:403 with {"message": "Missing Authentication Token"}, even with a valid key.Per-second rate limits now return rate_limited
Calls over the per-second rate limit still return 429, now with the standard error envelope and the code rate_limited:{"message": "Too Many Requests"} body. Use error.code to tell them apart from quota_exceeded, which means your quota for the period is used up. Rate-limited responses don’t include Retry-After or X-RateLimit-* headers; back off briefly and retry.Timeouts now return timeout_error
Requests that time out still return 504, now with the standard error envelope and the code timeout_error:{"message": "Endpoint request timed out"} body. Timeout responses include Retry-After: 120; wait that many seconds before retrying the same request.Server failures now return internal_error
When the API fails before it can respond, it still returns 502, now with the standard error envelope and the code internal_error:{"message": "Internal server error"} body.Every other error now uses the standard error envelope
All errors now return the standard envelope.- Other
4xxerrors, such as a request that’s too large, return the codebad_request.error.details.typenames the specific reason, for exampleREQUEST_TOO_LARGE. - Other
5xxerrors return the codeinternal_error.
request_id when you contact support about an error.