Skip to main content
POST

Authorizations

Authorization
string
header
required

Use Authorization: Bearer sk-... from https://omniall.ai/dashboard

Headers

x-goog-api-key
string

Optional Gemini-style API key header.

Path Parameters

model
string
required

Gemini model id (as exposed in Model Square / GET /v1/models).

Example:

"gemini-3.1-flash-image-preview"

Query Parameters

key
string

Optional Gemini-style API key query param.

Body

application/json

Native Gemini generateContent request body, relayed by Omniall AI. One contents turn is the minimum; add prior user/model turns for multi-turn chat.

contents
object[]
required

Ordered conversation turns sent to Gemini. Each item is one message from either the user or the model. For a first request, usually a single user turn is enough.

systemInstruction
object

Optional system-level instruction that steers model behavior for the whole request (persona, output format, safety rules). Not counted as a user/model turn in contents.

tools
object[]

Optional tools the model may call. Examples: { "googleSearch": {} } for grounding/web search (when enabled), or { "functionDeclarations": [ ... ] } for your own agent functions. Availability depends on the model/channel.

toolConfig
object

Controls how tools are selected (for example function-calling mode). Pass through as Gemini toolConfig when you need to force/auto function calls.

generationConfig
object

Sampling and output controls for this generation.

safetySettings
object[]

Per-category safety thresholds (harassment, hate, sexual, dangerous content, etc.). Use when you need stricter or looser filtering than defaults.

Response

Gemini response JSON (or SSE for streamGenerateContent).

Gemini generateContent response. Read the first candidate’s content.parts for the answer text/images.

candidates
object[]

One or more candidate replies. Usually use candidates[0].

usageMetadata
object

Token usage for billing/debugging.