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 with generationConfig.thinkingConfig for budget control.
- Multimodal input — inline_data parts for image / audio / video / file content alongside text parts.
- Function calling — tools: [{functionDeclarations: [...]}].
- Built-in server tools — tools: [{googleSearch: {}}], tools: [{codeExecution: {}}], tools: [{urlContext: {}}].
- Text-to-speech — *-tts preview models with generationConfig.responseModalities: ["AUDIO"] and speechConfig.voiceConfig.
- Image generation — gemini-*-image* models; the response carries the image as an inlineData part.
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.
Path parameters
Request 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.