GrepBoard/Manuals
605 manuals ·

Gemini API 16

Gemini API errors, access limits and model shutdowns.

  1. Gemini 2.5 Pro and Flash Now Route to Newer Models

    From Dec 1, 2026, gemini-2.5-pro requests route to gemini-3.8-flash and gemini-2.5-flash to gemini-3.5-flash-lite, billed at the new model's rates.

    Debian 12.15 (Docker) · GNU grep 3.8 · Gemini API official docs · 2026-12
  2. Gemini API 402 payment_required: Prepay Credits Depleted

    Gemini API 402 payment_required means your Prepay credit balance is $0. Don't retry: add credits in AI Studio, and set a monthly limit if you use auto-reload.

    Gemini API docs (API errors, Billing) · 2026-11
  3. Migrate from Gemini 3.8 Flash to Gemini 4 Hydrogen

    Moving from gemini-3.8-flash to gemini-4-hydrogen: default thinking level becomes high, xhigh is new, minimal is rejected, and output price changes.

    Gemini API docs · 2026-11-12 GA
  4. Migrate to Gemini 4 Carbon: 4 request changes to make

    A new model name is not enough. Raise a max_output_tokens set below 32,768, drop explicit caches, remove temperature, and plan for prices that double on Dec 1.

    Gemini API official docs · GA 2026-11-10
  5. Gemini TTS and Live preview shutdown dates: TTS on Dec 18, 2026

    Three Gemini TTS previews now shut down Dec 18, 2026, not Nov 17. Native audio is Mar 31, 2027, and 3.1 Flash Live has no announced date.

    Ubuntu 24.04 (Docker) · GNU grep 3.11 · Gemini API and Vertex AI official docs · 2026-12
  6. Gemini API finishReason "RECITATION": why output stops

    Gemini API returns finishReason RECITATION when output may resemble existing data. Make the prompt more unique and read citationMetadata to find the span.

    Python 3.12 sample JSON test · Gemini API official docs · 2026-10
  7. Lock Gemini's response to a JSON schema

    Send a mime_type and a JSON schema with the Gemini API request to get a fixed JSON shape back. Covers supported keywords, limits, and checking the result.

    Gemini API official docs · 2026-10 · responses checked with jsonschema 4.10.3
  8. Gemini 4 and 3.6+ ignore temperature, top_p, top_k: remove them

    Gemini 4 and 3.6+ ignore custom temperature, top_p, top_k and send a deprecation warning header; a 400 is planned later. Remove all three now.

    Gemini API official docs · 2026-10
  9. Fix Gemini 2.5 404 "no longer available to new users"

    Gemini 2.5 404 "no longer available to new users" is an access limit. 2.5 Pro and Flash are also deprecated and reroute from Dec 1, so use a newer model.

    Gemini API official docs · 2026-12
  10. Fix Gemini API 403 "Your project has been denied access"

    Gemini API 403 Your project has been denied access blocks the Cloud project, not the key. Read its AI Studio status, then fix billing or a suspension.

    Gemini API official docs · 2026-10
  11. Check finishReason when a Gemini response has empty text

    When a Gemini API response has no text, read promptFeedback.blockReason, then candidates[0].finishReason, to find the cause. Includes a classifier.

    Python 3.12 on sample JSON · Gemini API reference and safety settings docs, 2026-10
  12. Fix Gemini API 403 "Your API key was reported as leaked"

    When the Gemini API returns 403 "reported as leaked", find the blocked key in AI Studio, switch to a new one, then take keys out of code and repositories.

    Gemini API official docs · 2026-10
  13. Fix Gemini API 400 "User location is not supported"

    When the Gemini API returns 400 "User location is not supported", find where requests leave from and check it against the official regions list.

    Gemini API official docs · 2026-10
  14. Fix Gemini API 404 "models/... is not found for v1beta"

    When the Gemini API returns 404 "models/gemini-pro is not found for v1beta", check the name with ListModels, then tell a retired model from an alias.

    Gemini API official docs · 2026-10
  15. Fix Gemini API 503 "The model is overloaded"

    When the Gemini API returns 503 "The model is overloaded", tell it from a 429 quota error, then retry with backoff and move non-realtime jobs to the Batch API.

    Gemini API official docs · 2026-10
  16. Retry Gemini API 429 and 503 Errors with Backoff

    429 RESOURCE_EXHAUSTED and 503 UNAVAILABLE need different handling. A Python retry function with backoff and jitter, tested on a fake server.

    Ubuntu 24.04 · Python 3.12.3 (stdlib) · tested against a local fake server · error classes per Gemini API docs, 2026-10