OpenAI API 502 Bad Gateway
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
502 means the gateway/upstream is temporarily unavailable. Usually transient and recoverable on retry.
Common causes
- •Transient OpenAI-side issue
- •Gateway overload
- •Fallout from a larger outage
- •Network path issues
How to fix
- 1.Retry with exponential backoff
- 2.Wait a little
- 3.Check status at top of page and official status
- 4.Check proxy/network
When waiting helps (and when it won't)
Mostly a transient upstream issue—retrying after a wait usually recovers.
Alternatives when OpenAI API is down
Related errors
FAQ
What is 502 Bad Gateway?
502 means the gateway/upstream is temporarily unavailable. Usually transient and recoverable on retry.
How do I fix 502 Bad Gateway?
Retry with exponential backoff / Wait a little / Check status at top of page and official status / Check proxy/network