Subject: Repeated 503 UNAVAILABLE errors when calling Gemini API
Hello Google AI Support,
I am trying to build a personal AI assistant using the Gemini API, but I have not been able to receive a successful text-generation response.
Environment:
- Android with Termux
- Python 3.14
- Python standard-library urllib.request
- Gemini Developer API, REST generateContent endpoint
Models tested:
- gemini-flash-latest
- gemini-3.8-flash
Both models repeatedly returned:
HTTP 503
{
“error”: {
"code": 503,
"message": "This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.",
"status": "UNAVAILABLE"
}
}
Troubleshooting completed:
- Successfully retrieved the available models using GET /v1beta/models with my API key.
- Sent a minimal text-only request, such as “Hello”.
- Retried requests with increasing delays of 10, 20, and 40 seconds.
- Increased the request timeout from 60 to 120 seconds.
- Also experienced read timeouts on some attempts.
I tried gemini-2.5-flash as an alternative, but it returned HTTP 404 stating that it is no longer available to new users and recommending gemini-3.8-flash.
Example request body:
{
“contents”: [
{
"parts": \[
{"text": "Hello"}
\]
}
]
}
Time of issue:
October 22, 2026, approximately 22:30–22:54 (UTC+03:00).
Could you please investigate whether this is a temporary capacity issue or a problem affecting my project/account? Please also advise which currently available model and API endpoint I should use for a basic text-generation request.
I have intentionally omitted my API key for security.
Thank you.