Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Google Gemini API

Gemini API errors and fixes

30 Gemini API errors from the official error docs, grouped by HTTP status, each with what it means, why it happens, the documented fix and whether to retry. Verified .

Error response body

The shape Gemini API errors come back in, as the official docs show it. Read the status and error type from here before matching an entry below.

Interactions API (recommended): {"error": {"code": "invalid_request", "message": "The value 'invalid_tool_type_xyz' is not supported for 'type' at 'tools[0]'."}}. Streaming (SSE): {"event_type": "error", "error": {"code": "not_found", "message": "Failed to get completed interaction: Result not found."}}. generateContent API (legacy): {"error": {"code": 400, "message": "API key not valid. Please pass a valid API key.", "status": "INVALID_ARGUMENT", "details": [{"@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "API_KEY_INVALID", "domain": "googleapis.com", "metadata": {"service": "generativelanguage.googleapis.com"}}, {"@type": "type.googleapis.com/google.rpc.LocalizedMessage", "locale": "en-US", "message": "API key not valid. Please pass a valid API key."}]}}

HTTP 400 Bad Request

HTTP 401 Unauthorized

HTTP 402 Payment Required

HTTP 403 Forbidden

HTTP 404 Not Found

HTTP 409 Conflict

HTTP 416 Range Not Satisfiable

HTTP 429 Too Many Requests

HTTP 499

HTTP 500 Internal Server Error

HTTP 501 Not Implemented

HTTP 503 Service Unavailable

HTTP 504 Gateway Timeout

No HTTP status

Newsletter

Know when the APIs change

One email per week. New model releases, API changes, what broke, and how developers are working around it.