guides/error-codes.md +5 −3
145To resolve this error, please follow these steps:145To resolve this error, please follow these steps:
146 146
147- Pace your requests and avoid making unnecessary or redundant calls.147- Pace your requests and avoid making unnecessary or redundant calls.
148148- If a `Retry-After` header is present, wait at least as long as it specifies before trying again. If it's missing, use exponential backoff with jitter and limit the number of retries. Each official SDK already honors this header for eligible retries. Read more in our [rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits).- If a `Retry-After` header is present, wait at least as long as it specifies before trying again. If it's missing, use exponential backoff with jitter and limit the number of retries. SDK support for long server delays varies by version and configuration. Read more in our [rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits#retrying-with-exponential-backoff).
149- If you are sharing your organization with other users, note that limits are applied per organization and not per user. It is worth checking on the usage of the rest of your team as this will contribute to the limit.149- If you are sharing your organization with other users, note that limits are applied per organization and not per user. It is worth checking on the usage of the rest of your team as this will contribute to the limit.
150- If you are using a free or low-tier plan, consider upgrading to a pay-as-you-go plan that offers a higher rate limit. You can compare the restrictions of each plan in our [rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits).150- If you are using a free or low-tier plan, consider upgrading to a pay-as-you-go plan that offers a higher rate limit. You can compare the restrictions of each plan in our [rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits).
151- Reach out to your organization owner to increase the rate limits on your project151- Reach out to your organization owner to increase the rate limits on your project
229 229
230## Python library error types230## Python library error types
231 231
232Python raises `RateLimitError` for `429` responses and `InternalServerError` for `503` responses. If your handler previously caught only one of these classes for throttling and overload, handle both and inspect `error.code`. Video overload, for example, now returns `503` where it previously returned `429`. See [migration guidance](https://developers.openai.com/api/docs/guides/rate-limits#update-existing-error-handlers) for the endpoint-specific changes.
233
232| Type | Overview |234| Type | Overview |
233| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |235| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
234| APIConnectionError | **Cause:** Issue connecting to our services. <br /> **Solution:** Check your network settings, proxy configuration, SSL certificates, or firewall rules. |236| APIConnectionError | **Cause:** Issue connecting to our services. <br /> **Solution:** Check your network settings, proxy configuration, SSL certificates, or firewall rules. |
239| InternalServerError | **Cause:** Issue on our side. <br /> **Solution:** Retry your request after a brief wait and contact us if the issue persists. |241| InternalServerError | **Cause:** Issue on our side. <br /> **Solution:** Retry your request after a brief wait and contact us if the issue persists. |
240| NotFoundError | **Cause:** Requested resource does not exist. <br /> **Solution:** Ensure you are the correct resource identifier. |242| NotFoundError | **Cause:** Requested resource does not exist. <br /> **Solution:** Ensure you are the correct resource identifier. |
241| PermissionDeniedError | **Cause:** You don't have access to the requested resource. <br /> **Solution:** Ensure you are using the correct API key, organization ID, and resource ID. |243| PermissionDeniedError | **Cause:** You don't have access to the requested resource. <br /> **Solution:** Ensure you are using the correct API key, organization ID, and resource ID. |
242244| RateLimitError | **Cause:** You have hit your assigned rate limit. <br /> **Solution:** Pace your requests and follow `Retry-After` when it's present. Each official SDK already honors this header for eligible retries. Read more in our [Rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits). || RateLimitError | **Cause:** You have hit your assigned rate limit or increased traffic too quickly. <br /> **Solution:** Pace your requests and follow `Retry-After` when it's present, subject to your retry limits. Read more in our [Rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits#retrying-with-exponential-backoff). |
243| UnprocessableEntityError | **Cause:** Unable to process the request despite the format being correct. <br /> **Solution:** Please try the request again. |245| UnprocessableEntityError | **Cause:** Unable to process the request despite the format being correct. <br /> **Solution:** Please try the request again. |
244 246
245 247
348If you encounter a `RateLimitError`, please try the following steps:350If you encounter a `RateLimitError`, please try the following steps:
349 351
350- Send fewer tokens or requests or slow down. You may need to reduce the frequency or volume of your requests, batch your tokens, or use exponential backoff when `Retry-After` isn't present. You can read our [Rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits) for more details.352- Send fewer tokens or requests or slow down. You may need to reduce the frequency or volume of your requests, batch your tokens, or use exponential backoff when `Retry-After` isn't present. You can read our [Rate limit guide](https://developers.openai.com/api/docs/guides/rate-limits) for more details.
351353- When `Retry-After` is present, wait at least as long as it specifies before retrying. The official Python library already honors this header for eligible retries.- When `Retry-After` is present, wait at least as long as it specifies before retrying. The Python library can stop automatic retries when a server delay exceeds its supported limit. If you retry at the application level, respect the original delay and account for SDK retries.
352- You can also check your API usage statistics from your account dashboard.354- You can also check your API usage statistics from your account dashboard.
353 355
354 356