Gemini native generate
Direct passthrough to Google’s Gemini API. The model_path
parameter is <model>:<action>, for example
google/gemini-2.5-flash:generateContent or
google/gemini-2.5-flash:streamGenerateContent.
Supported actions:
| Action | What it does |
|---|---|
:generateContent | One-shot response (JSON) |
:streamGenerateContent | SSE stream of partial chunks |
What you can do on this surface (request shape stays Gemini’s native JSON; pick the right model for each):
- Chat / reasoning — any
gemini-*chat model, paired withgenerationConfig.thinkingConfigfor budget control. - Multimodal input —
inline_dataparts for image / audio / video / file content alongsidetextparts. - Function calling —
tools: [{functionDeclarations: [...]}]. - Built-in server tools —
tools: [{googleSearch: {}}],tools: [{codeExecution: {}}],tools: [{urlContext: {}}]. - Text-to-speech —
*-ttspreview models withgenerationConfig.responseModalities: ["AUDIO"]andspeechConfig.voiceConfig. - Image generation —
gemini-*-image*models; the response carries the image as aninlineDatapart.
Authentication accepts the standard Authorization: Bearer sk-orca-… header, plus the Gemini-style x-goog-api-key
header and ?key= query string for google-genai SDK
compatibility — see Get an API key.
Authorizations
OrcaRouter API keys look like sk-orca-.... Pass them in the
Authorization: Bearer sk-orca-... header.
Path Parameters
Body
Gemini-native request body (Google's GenerateContentRequest
shape). See the examples for common payloads.
Response
Successful response. For :generateContent the body is
JSON (GenerateContentResponse). For :streamGenerateContent
the body is SSE (text/event-stream); each event is a
partial GenerateContentResponse.
Gemini-native GenerateContentResponse.
