Prerequisites
Check rate limit headers
Chat completion responses include request-level rate limit headers:Handle 429 responses
When you exceed a rate limit, the API returns a429 Too Many Requests response with a Retry-After header:
Check rate limit headers and handle 429 responses.
429 Too Many Requests response with a Retry-After header: