Gemini API error 503 UNAVAILABLE: what it means and what to do
Quick answer: A 503 from the Gemini API is on Google's side: the service is temporarily overloaded or down. Your code is fine. Retry with exponential backoff and check the live status above.
The message you're seeing
503 UNAVAILABLEservice_unavailable504 DEADLINE_EXCEEDED
Is it down right now?
- Gemini · checked No problems
Live status, updated every minute. If it says “No problems”, the cause is most likely on your side: follow the steps below.
How to handle 503s
- Retry with exponential backoffWait a little, then retry, doubling the wait each time.
- Add jitterA small random extra delay stops all your clients retrying at the same moment.
- Set a maximum number of retriesGive up after a few attempts and show a friendly message instead of retrying forever.
504: the request didn't finish in time
A 504 DEADLINE_EXCEEDED means the request didn't finish within its deadline. Large prompts or a short client timeout can cause it; it's also worth a retry.
Which errors to retry
Google's troubleshooting guide says to retry only temporary errors such as 429, 408 and 5xx errors. Don't retry 400, 402 or 403 errors: they won't fix themselves.
Questions
Does the Gemini SDK retry automatically?
Google's guide says the Python SDK retries temporary errors automatically, up to four times, starting with a delay of about one second.
Is a 503 my fault?
No. Google describes it as the service being temporarily overloaded or down.
How do I know if Gemini is having a wider problem?
Check the live verdict at the top of this page. It combines Google's official Gemini status, our own checks every minute and visitor reports.
Want to know when Gemini has a real outage? Follow our free outage alerts. We only post real outages, and again when they're fixed.
Related error guides
- Gemini API 429 RESOURCE_EXHAUSTED
- Gemini “Something went wrong”
- Gemini API 403 PERMISSION_DENIED
- Gemini API 400 errors
Based on official documentation, checked 3 November 2026: Google AI Studio: API errors · Google AI Studio: Troubleshooting. Error messages and limits change over time, so the provider's own docs are the final word.