inference-providers

Google Gemini API

first_party

DocsConsole

Getting credentials

api-key

api_key via header (header x-goog-api-key)

Environment: GEMINI_API_KEY GOOGLE_API_KEY

AI Studio → Get API key. Prefer the x-goog-api-key header; the legacy ?key= query param leaks keys into logs.

Credentials docs

Endpoints

IDURLProtocolAuth
generate-contenthttps://generativelanguage.googleapis.com/v1beta/models/{model}:generateContentgoogle-generate-contentany

API surfaces

textstreamingembeddingsfilesbatchcount_tokensprompt_caching

Quirks

Models offered

ModelWire IDEndpointStatusReasoning
google/gemini-3-1-progemini-3.1-pro-previewgenerate-contentprevieweffort · default on · mandatory · returns thought_parts · round-trips thought_signature
google/gemini-3-5-flash-litegemini-3.5-flash-litegenerate-contentgaeffort · default on · returns thought_parts · round-trips thought_signature
google/gemini-3-6-flashgemini-3.6-flashgenerate-contentgaeffort · default on · returns thought_parts · round-trips thought_signature
google/gemini-3-7-flashgemini-3.7-flashgenerate-contentgaeffort · default on · mandatory · returns thought_parts · round-trips thought_signature
google/gemini-3-flashgemini-3-flash-previewgenerate-contentprevieweffort · default on · mandatory · returns thought_parts · round-trips thought_signature
google/gemini-3-progemini-3-pro-previewgenerate-contentprevieweffort · default on · mandatory · returns thought_parts · round-trips thought_signature
google/gemma-4gemma-4-31b-itgenerate-contentgaadaptive · default on · returns hidden