OpenAI API timeout (no response in time)
Is there an outage right now?
OpenAI API official status is operational. If this error persists, it is likely an implementation or environment issue on your side.
View OpenAI API status →What this error means
The response does not return within the time limit: long generations, network, overload, or too-short client timeout.
Common causes
- •Generation too long to finish in time
- •Unstable network
- •OpenAI-side overload
- •Client timeout too short
- •Proxy/gateway timeout
How to fix
- 1.Use streaming (stream=true)
- 2.Reduce max_tokens / input
- 3.Increase the client timeout
- 4.Retry with exponential backoff
- 5.Check network/proxy settings
When waiting helps (and when it won't)
Improves over time if overload-related. If persistent, switch to streaming and review timeouts.
Alternatives when OpenAI API is down
Related errors
FAQ
What is Timeout / gateway timeout?
The response does not return within the time limit: long generations, network, overload, or too-short client timeout.
How do I fix Timeout / gateway timeout?
Use streaming (stream=true) / Reduce max_tokens / input / Increase the client timeout / Retry with exponential backoff / Check network/proxy settings