The official OpenAI SDKs retry 429, 5xx, and connection errors with exponential backoff. If you call the API directly, retry the same responses and honor Retry-After when it is present.
Don’t retry other 4xx errors: they fail the same way every time.