Python 88.3%
TypeScript 7.6%
Shell 4.1%
1[2 {"provider": "gemini", "http_status": 400, "type": "INVALID_ARGUMENT", "code": "400", "category": "invalid_request", "message_semantics": "Malformed request body, unknown field, invalid parameter value (e.g. thinking_level together with thinking_budget -> 400; temperature out of [0,maxTemperature]; invalid API key -> 'API key not valid. Please pass a valid API key.'). google.rpc.Status shape: {error:{code:400,message,status:'INVALID_ARGUMENT',details:[...]}}. OpenAI-compat layer without Authorization header -> 400 INVALID_ARGUMENT 'Missing or invalid Authorization header.' (array-wrapped body).", "retryable": false, "recommended_action": "Fix the request; check API version (v1 vs v1beta) and model support for the feature; do not retry unchanged.", "observed_live": true, "example": [{"error": {"code": 400, "message": "Missing or invalid Authorization header.", "status": "INVALID_ARGUMENT"}}], "status": ["DOCUMENTED", "LIVE_VERIFIED"], "source": "https://ai.google.dev/gemini-api/docs/troubleshooting"},3 {"provider": "gemini", "http_status": 400, "type": "FAILED_PRECONDITION", "code": "400", "category": "permission", "message_semantics": "Prerequisite not met: billing not enabled for a paid-only feature/model, or the Free tier is not available in the user's country/region ('User location is not supported for the API use'). Interactions API code: failed_precondition.", "retryable": false, "recommended_action": "Enable billing in AI Studio / check available-regions; for EEA/UK/CH end users use Paid Services.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},4 {"provider": "gemini", "http_status": 401, "type": "UNAUTHENTICATED", "code": "401", "category": "authentication", "message_semantics": "Missing/invalid/expired credential (OAuth token or ephemeral token). Interactions API code: authentication. Plain invalid API keys usually surface as 400 INVALID_ARGUMENT 'API key not valid' or 403 PERMISSION_DENIED rather than 401.", "retryable": false, "recommended_action": "Verify the key/token; regenerate blocked or leaked keys in AI Studio.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},5 {"provider": "gemini", "http_status": 403, "type": "PERMISSION_DENIED", "code": "403", "category": "permission", "message_semantics": "Key lacks permission (API not enabled on the project, key restricted to other APIs, leaked/blocked key: 'Your API key was reported as leaked. Please use another API key.', tuned model / corpus not owned by the caller). Interactions API code: permission_denied.", "retryable": false, "recommended_action": "Check key restrictions (Restrict to Gemini API only), project, IAM; rotate leaked keys.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/troubleshooting"},6 {"provider": "gemini", "http_status": 404, "type": "NOT_FOUND", "code": "404", "category": "not_found", "message_semantics": "Model or resource not found for the API version, OR (undocumented) model no longer available to new users. Live messages: 'Model is not found: models/imagen-4.0-generate-001 for api version v1beta'; 'Model is not found: models/gemini-3.1-pro-preview for api version v1' (preview ids are v1beta-only); 'This model models/gemini-2.5-flash-lite is no longer available to new users. Please update your code to use models/gemini-3.5-flash-lite for the latest features and improvements. We recommend you to use the Interactions API.' (GET models/gemini-2.5-flash-lite still 200). OpenAI-compat with wrong auth header: 'Requested entity was not found.' Interactions codes: not_found, model_not_found.", "retryable": false, "recommended_action": "Check the id against GET /v1beta/models; for 2.5 models on new keys migrate to 3.x; for previews use /v1beta.", "observed_live": true, "example": {"error": {"code": 404, "message": "This model models/gemini-2.5-flash-lite is no longer available to new users. Please update your code to use models/gemini-3.5-flash-lite for the latest features and improvements. We recommend you to use the Interactions API.", "status": "NOT_FOUND"}}, "status": ["DOCUMENTED", "LIVE_VERIFIED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},7 {"provider": "gemini", "http_status": 409, "type": "ALREADY_EXISTS / ABORTED", "code": "409", "category": "invalid_request", "message_semantics": "Resource already exists (file search store / document names) or concurrency conflict. Interactions API codes: already_exists, aborted.", "retryable": "aborted: yes at application level; already_exists: no", "recommended_action": "Check existence before create; retry aborted operations.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},8 {"provider": "gemini", "http_status": 416, "type": "OUT_OF_RANGE", "code": "416", "category": "invalid_request", "message_semantics": "Request parameter outside the valid range (Interactions API code out_of_range).", "retryable": false, "recommended_action": "Check parameter values and limits.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},9 {"provider": "gemini", "http_status": 429, "type": "RESOURCE_EXHAUSTED", "code": "429", "category": "rate_limit", "message_semantics": "RPM/TPM/RPD/IPM quota, spend-based 10-minute limit, or Flex capacity shed. Body carries google.rpc.Help + google.rpc.QuotaFailure details with quotaMetric / quotaId / quotaDimensions{model,location} and the retry delay in the message ('Please retry in 54.22s'). Free-tier keys get 'limit: 0' for paid-only models (Pro). Interactions codes: rate_limit_exceeded, quota_exceeded, too_many_requests.", "retryable": true, "backoff": "exponential with jitter (1s, 2s, 4s, 8s...), cap attempts; SDK default 4 attempts, initial ~1s, max 60s; honour the seconds in the message; no Retry-After header", "recommended_action": "Back off; reduce request rate or context size; upgrade tier / request increase; for 'limit: 0' enable billing.", "observed_live": true, "example": {"error": {"code": 429, "message": "You exceeded your current quota, please check your plan and billing details. ... * Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0, model: gemini-3.1-pro ... Please retry in 50.868302469s.", "status": "RESOURCE_EXHAUSTED", "details": [{"@type": "type.googleapis.com/google.rpc.Help"}, {"@type": "type.googleapis.com/google.rpc.QuotaFailure", "violations": [{"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_requests", "quotaId": "GenerateRequestsPerDayPerProjectPerModel-FreeTier", "quotaDimensions": {"model": "gemini-3.1-pro", "location": "global"}}]}]}}, "status": ["DOCUMENTED", "LIVE_VERIFIED"], "source": "https://ai.google.dev/gemini-api/docs/rate-limits"},10 {"provider": "gemini", "http_status": 499, "type": "CANCELLED", "code": "499", "category": "timeout", "message_semantics": "Client closed the request before completion (Interactions API code cancelled).", "retryable": "n/a", "recommended_action": "No action; usually a client disconnect.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},11 {"provider": "gemini", "http_status": 500, "type": "INTERNAL", "code": "500", "category": "server_error", "message_semantics": "Unexpected server error; may also surface for oversized contexts or unusual inputs. Interactions code api_error.", "retryable": true, "backoff": "exponential; if persistent reduce context / switch model / report on the forum", "recommended_action": "Retry; reduce input; try another model.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/troubleshooting"},12 {"provider": "gemini", "http_status": 501, "type": "UNIMPLEMENTED", "code": "501", "category": "invalid_request", "message_semantics": "Operation/feature not implemented or not supported for this model/version (Interactions code unimplemented).", "retryable": false, "recommended_action": "Check capabilities; switch to a supported feature or API version.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},13 {"provider": "gemini", "http_status": 503, "type": "UNAVAILABLE", "code": "503", "category": "overload", "message_semantics": "Service temporarily overloaded or down ('The model is overloaded. Please try again later.'). Interactions code service_unavailable. Also used when Flex capacity is unavailable.", "retryable": true, "backoff": "exponential with jitter; consider Priority tier for business-critical traffic, or a Flash/Lite fallback model", "recommended_action": "Retry with backoff; temporarily switch model.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/troubleshooting"},14 {"provider": "gemini", "http_status": 504, "type": "DEADLINE_EXCEEDED", "code": "504", "category": "timeout", "message_semantics": "Request did not finish within the deadline (large prompts, long thinking, Flex queueing). Interactions code deadline_exceeded.", "retryable": true, "backoff": "increase/remove client timeout (SDK http_options.timeout), use streaming, background execution or Batch", "recommended_action": "Raise the client deadline or use background=true / Batch API.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},15 {"provider": "gemini", "http_status": 200, "type": "promptFeedback.blockReason", "code": "SAFETY | OTHER | BLOCKLIST | PROHIBITED_CONTENT | IMAGE_SAFETY", "category": "content_safety", "message_semantics": "HTTP 200 with NO candidates: the prompt itself was blocked. promptFeedback.blockReason enum (generate-content reference): BLOCK_REASON_UNSPECIFIED, SAFETY (inspect safetyRatings), OTHER (terms of service / unsupported), BLOCKLIST (terminology blocklist), PROHIBITED_CONTENT, IMAGE_SAFETY.", "retryable": false, "recommended_action": "Rewrite the prompt; adjust safetySettings thresholds where allowed (not for prohibited content).", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/api/generate-content#BlockReason"},16 {"provider": "gemini", "http_status": 200, "type": "candidates[].finishReason", "code": "STOP | MAX_TOKENS | SAFETY | RECITATION | LANGUAGE | OTHER | BLOCKLIST | PROHIBITED_CONTENT | SPII | MALFORMED_FUNCTION_CALL | IMAGE_SAFETY | IMAGE_PROHIBITED_CONTENT | IMAGE_OTHER | NO_IMAGE | IMAGE_RECITATION | UNEXPECTED_TOOL_CALL | TOO_MANY_TOOL_CALLS | MISSING_THOUGHT_SIGNATURE | MALFORMED_RESPONSE", "category": "content_safety", "message_semantics": "Why generation stopped. Live: MAX_TOKENS with maxOutputTokens=8 on thinking models (all budget spent on thoughts -> empty text, thoughtsTokenCount=5); STOP on gemini-3.5-flash-lite. RECITATION = output resembles training data (make prompt unique / raise temperature); LANGUAGE = unsupported language; MISSING_THOUGHT_SIGNATURE = Gemini 3 multi-turn function calling without echoing thoughtSignature parts. Interactions API maps these to snake_case generation codes (safety, recitation, malformed_function_call, missing_thought_signature ...).", "retryable": "MAX_TOKENS: raise maxOutputTokens / lower thinking_level; RECITATION/OTHER: change prompt; MISSING_THOUGHT_SIGNATURE: fix history", "recommended_action": "Always check finishReason before reading parts; treat non-STOP as partial.", "observed_live": true, "status": ["DOCUMENTED", "LIVE_VERIFIED"], "source": "https://ai.google.dev/api/generate-content#FinishReason"},17 {"provider": "gemini", "http_status": 200, "type": "Interactions API error object", "code": "invalid_request | failed_precondition | out_of_range | parameter_unknown | authentication | permission_denied | not_found | model_not_found | already_exists | aborted | rate_limit_exceeded | quota_exceeded | too_many_requests | cancelled | api_error | unimplemented | service_unavailable | deadline_exceeded | <snake_case http status>", "category": "invalid_request", "message_semantics": "The Interactions API (/v1beta/interactions, /v1/interactions) returns {error:{code:'<snake_case>',message}} instead of google.rpc.Status; in SSE streams errors arrive as an event with event_type 'error'. Generation-blocked codes: safety, recitation, language, prohibited_content, spii, blocklist, image_safety, image_prohibited_content, image_recitation, image_other, content_blocked. Generation error codes: malformed_function_call, malformed_tool_call, unexpected_tool_call, no_image, too_many_tool_calls, missing_thought_signature.", "retryable": "per code (rate_limit_exceeded/too_many_requests/api_error/service_unavailable/deadline_exceeded/aborted retryable)", "recommended_action": "Branch on `error.code`; HTTP status still set on non-streaming responses.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/api-errors"},18 {"provider": "gemini", "http_status": 400, "type": "OpenAI-compat error envelope", "code": "400 | 404 | 429 | 500", "category": "invalid_request", "message_semantics": "The /v1beta/openai/* layer returns Google-style errors, sometimes wrapped in a JSON array: [{error:{code:400,message:'Missing or invalid Authorization header.',status:'INVALID_ARGUMENT'}}] (live). Unknown OpenAI parameters are silently ignored rather than rejected.", "retryable": false, "recommended_action": "Use Authorization: Bearer <GEMINI_API_KEY>; unwrap arrays before parsing.", "observed_live": true, "status": ["LIVE_VERIFIED"], "source": "live probe 2026-09-19"},19 {"provider": "gemini", "http_status": null, "type": "WebSocket close (Live API)", "code": "1000-1011 + close reason", "category": "timeout", "message_semantics": "Live API sessions end by WebSocket close: session lifetime exceeded (15 min audio / 2 min audio+video without compression), connection reset (~10 min; use sessionResumption), goAway message before termination, invalid ephemeral token.", "retryable": true, "backoff": "reconnect with the sessionResumption handle (valid 2 h)", "recommended_action": "Handle goAway/close, resume the session.", "observed_live": false, "status": ["DOCUMENTED"], "source": "https://ai.google.dev/gemini-api/docs/live-api/session"}20]21