Gemini 3.8 Flash Free tier: Recurring HTTP 503 and ReadTimeout.

I am using the Gemini Developer API on a Free tier project. I need to check the model’s availability status and do not wish to upgrade tiers or retry automatically at this stage.

  • Model: gemini-3.8-flash.
  • Endpoint: POST ``https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:generateContent.
  • Client: Python 3.12.14, HTTPX 0.28.1, Windows, direct REST; TLS verification enabled, using the current ambient proxy/CA environment, no redirects or automatic retries.
  • Request: text/structured JSON, low thinking, output ceiling 8192; one request expecting two items in the JSON.
  • Most recent attempt omitted generationConfig.candidateCount; no grounding, Search, Maps, or model fallbacks used.
  • 10/28/2026, 16:23:48–16:24:13 UTC: HTTP 503, 25.281 seconds; no valid generation response received.
  • 10/28/2026, 16:49:08–16:49:15 UTC: HTTP 503, 7.563 seconds; no valid generation response received.
  • 10/28/2026, 18:02:30–18:04:32 UTC (10/29/2026, 01:02:30–01:04:32 UTC+07): after omitting candidateCount, a small diagnostic request hit httpx.ReadTimeout, 122.047 seconds; read timeout 120, connect/write/pool 60. No HTTP status code or error responseId/request ID received; no retry.
  • Prior to this string of errors, a two-item request had succeeded, taking about 58 seconds, with modelVersion returning gemini-3.8-flash. The prompt hash of the new attempt matched the successful run, but the candidateCount payload configuration differed; this does not prove the root cause.
  • The Rate limits UI for the model shows 5 RPM, 20 RPD; the TPM curve is around 250K, but the exact tooltip value was not checked. Remaining usage/quota has not been verified; the public Free tier status showed operational on the last check, but that does not guarantee individual project status.
  • We have paused generation; we are not changing keys/projects/models, increasing caps/timeouts, or submitting retries.

Please advise on how to verify whether the project is subject to availability/capacity/routing restrictions, along with the minimum diagnostic information required to provide via the appropriate support channel. The migration/troubleshooting docs state to omit candidate_count for Gemini 3+, but the API reference examples still use candidateCount 1 for 3.8; please confirm which contract should be followed. Please do not ask to post API keys or prompts/corpora on public forums.

Hello Wangnhat,

503 errors are due to our services being temporarily overloaded. Please see this pinned post for suggestions on how to handle this.

When calling the REST endpoint v1beta/models/gemini-3.8-flash:generateContent directly on the Free tier using httpx (Python 3.12), encountering both HTTP 503 UNAVAILABLE and httpx.ReadTimeout stems from two distinct mechanisms at the gateway layer:

Distinguishing HTTP 503 (Free Tier cluster overload) from ReadTimeout (Waiting for the first token - TTFT):

  • HTTP 503 is returned immediately when the GPU pool allocated for the Free tier in your region is fully saturated (MODEL_OVERLOADED).
  • httpx.ReadTimeout occurs because httpx sets timeout=5.0s by default for the entire read operation. With a non-streaming endpoint (:generateContent), the server only returns the HTTP body after generating the entire response; if model inference takes 6–12 seconds, httpx will drop the connection on its own even though the server is still processing normally.

How to accurately check availability status without automatic retries:
Separate the connect timeout (5s) and read timeout (45s), and use :streamGenerateContent?alt=sse to accurately measure the time to first byte (TTFB):

import httpx
import time

timeout_cfg = httpx.Timeout(connect=5.0, read=45.0, write=10.0, pool=5.0)
url = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-3.8-flash:streamGenerateContent?alt=sse'

t0 = time.monotonic()
with httpx.Client(timeout=timeout_cfg, http2=False) as client:
    with client.stream('POST', url, headers={'x-goog-api-key': API_KEY}, json=payload) as resp:
        ttfb = round(time.monotonic() - t0, 2)
        print(f'HTTP {resp.status_code} | TTFB: {ttfb}s')