Gemini

Google · 2 models · Text, Image, Audio, Video, File → Text

POSThttps://onerouter.com/v1/chat/completions

How to call

Pass any model ID from this series in the model field, e.g. google/gemini-3.5-flash. The example on the right uses Gemini 3.5 Flash.

Overview

Google's Gemini family offers fast multimodal models (text, image, audio, video, file input) with very large context windows.


This series includes 2 models: google/gemini-3.5-flash, google/gemini-3.1-flash-lite. They share the same request shape — switching between them is a one-line change to the model field of the Chat Completions API.

Models in this series

Switch tabs to compare each model's ID, context window, inputs, outputs, and capabilities. Check the Models page for current availability and pricing before use.

IDgoogle/gemini-3.5-flash
ProviderGoogle
Context window1.05M
Max output65.5K
InputText, Image, Audio, Video, File
OutputText
Knowledge cutoff2025-01-01
SummaryGemini 3.5 Flash is Google's fast multimodal model accepting text, image, audio, video, and file input across a 1.05M-token context.
StrengthsBroad input modality coverage, including video and audio, with a very large context window.
Supported parameters`max_tokens`, `reasoning`, `response_format`, `seed`, `stop`, `structured_outputs`, `temperature`

Request headers

ParameterTypeRequiredDescription
Authorizationstring · requiredrequiredBearer token, formatted as `Bearer YOUR_API_KEY`.
Content-Typestring · requiredrequiredMust be `application/json`.

Request body

These models use the OpenAI-compatible Chat Completions schema. Full field reference:

ParameterTypeRequiredDescriptionValues
modelstringrequiredModel ID from this series (see the tabs above).
messagesarrayrequiredConversation so far. Each item has `role` (`system`/`user`/`assistant`/`tool`) and `content`.
max_tokensintegeroptionalMaximum tokens to generate. Newer models use `max_completion_tokens`.
temperaturenumberoptionalSampling temperature, typically 0–2. Higher is more random.
top_pnumberoptionalNucleus sampling, 0–1.
stopstring | arrayoptionalUp to 4 sequences where generation stops.
frequency_penaltynumberoptional−2 to 2. Discourages repeating tokens.
presence_penaltynumberoptional−2 to 2. Encourages new topics.
seedintegeroptionalBest-effort deterministic sampling.
toolsarrayoptionalFunction/tool definitions the model may call.
tool_choicestring | objectoptionalControl tool use: `auto`, `none`, `required`, or a specific tool.
autononerequired
response_formatobjectoptionalConstrain output to `json_object` or `json_schema`.
reasoning_effortstringoptionalFor reasoning models: `low`, `medium`, or `high`.
lowmediumhigh
streambooleanoptionalReturn SSE deltas instead of one JSON response.
truefalse

Response fields

A non-streaming call returns a chat.completion object (see the panel on the right).

ParameterTypeRequiredDescription
idstringoptionalUnique identifier for the completion.
choicesarrayoptionalGenerated choices. `choices[0].message.content` holds the reply.
choices[].finish_reasonstringoptionalWhy generation stopped: `stop`, `length`, `tool_calls`, or `content_filter`.
usageobjectoptionalToken accounting: `prompt_tokens`, `completion_tokens`, `total_tokens`.
modelstringoptionalThe model that produced the response.

Model-dependent features

OneRouter keeps protocol compatibility and forwards model-specific parameters where supported. Features such as tool calling, structured output, reasoning, prompt caching, web search, image input, audio input, video generation, and provider-specific options depend on the selected model and upstream provider. Check the model detail page before relying on a feature in production.