v1

latestOpenAPI 3.1.0Commercial2026-07-26232551.7 KB
Gemini Native

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:

ActionWhat it does
:generateContentOne-shot response (JSON)
:streamGenerateContentSSE 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 inputinline_data parts for image / audio / video / file content alongside text parts.
  • Function callingtools: [{functionDeclarations: [...]}].
  • Built-in server toolstools: [{googleSearch: {}}], tools: [{codeExecution: {}}], tools: [{urlContext: {}}].
  • Text-to-speech*-tts preview models with generationConfig.responseModalities: ["AUDIO"] and speechConfig.voiceConfig.
  • Image generationgemini-*-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.

post/v1beta/models/{model_path}

Path parameters

model_pathstring required

Request body

object required

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.

object required

Gemini-native GenerateContentResponse.