Skip to main content
POST
Gemini native streaming text generation
  • Models: gemini-4-argon, gemini-4-hydrogen, gemini-4-neon, gemini-4-carbon; include alt=sse in the URL.
  • Use the same body as Native Multimodal Understanding.
  • Read native response chunks from data: events, wait for normal termination, and inspect finishReason and the final available usageMetadata.
  • Partial text does not establish complete success. Reconcile the result and charge after an interruption before submitting again.
For structured output, validate the assembled content and field types after the stream completes. Sending the parameters and reaching normal termination do not establish compliance with responseSchema.

Usage and errors

Do not sum cumulative usage snapshots. Input includes reported tool-use input, output includes reported thinking, and cached tokens are an input subset. Charges follow published account prices and final settlement. Automatic route changes do not alter the published price for this model. Insufficient balance can return 403 with insufficient_user_quota, in addition to 402.

Authorizations

Authorization
string
header
required

OmniMux API token

Path Parameters

model
enum<string>
required
Available options:
gemini-4-argon,
gemini-4-hydrogen,
gemini-4-neon,
gemini-4-carbon

Query Parameters

alt
enum<string>
required
Available options:
sse

Body

application/json
contents
object[]
required
Minimum array length: 1
systemInstruction
object

Task framework and scope; media content is data, not a higher-priority instruction

generationConfig
object
tools
object[]

Function declarations for a single-turn function-call response. The returned functionCall asks the client to execute the function; it does not run the function.

toolConfig
object

Response

SSE data events containing native response chunks

The response is of type string.