Source: OpenAI compatibility (Gemini API docs)
Google's OpenAI-compatible endpoint for Gemini: supported Chat Completions, embeddings, images and batch features, reasoning_effort mapping, extra_body fields and gaps.
Contents
- What: official documentation page
- Publisher: Google (Gemini API / AI Studio)
- Date: living document; read 2026-11-14
- Original: OpenAI compatibility
Summary
Gemini models can be called with OpenAI SDKs by changing the base URL to https://generativelanguage.googleapis.com/v1beta/openai/ and using a Gemini key. The layer is in beta and covers Chat Completions plus a few other endpoints.
Key claims
- Supported: chat completions (streaming, function calling, image and audio input, structured output parse,
service_tierflex/priority/standard), embeddings, image generation, batch (but file upload/download must use the native SDK), model list/retrieve. - The Responses API and a standalone Files API are not covered.
reasoning_effortmaps tothinking_levelon Gemini 3/4 (on Gemini 4 Hydrogenminimalandlowboth map tolow;xhighonly there) and tothinking_budgeton 2.5 (1,024 / 8,192 / 24,576).nonedisables thinking only on 2.5 models; Gemini 2.5 Pro, 3 and 4 cannot turn reasoning off.reasoning_effortcannot be combined with nativethinking_level/thinking_budget.- Native features via
extra_body:thinking_config(includinginclude_thoughts),cached_contentfor explicit caches. - Unlisted parameters are silently ignored.