Saltar para o conteúdo principal
POST
Generate Content

Autorizações

x-goog-api-key
string
header
obrigatório

Used by Gemini-shaped endpoints (/v1beta/...). The value is the gateway API key, shared with other endpoint shapes. The google-genai SDK uses this header by default.

Parâmetros de caminho

model
string
obrigatório

Gemini model name, e.g. gemini-2.5-pro.

Corpo

application/json

Native Gemini generateContent request body. Field definitions here are illustrative — refer to https://ai.google.dev/api/rest/v1beta/models/generateContent as the authoritative reference.

contents
object[]
generationConfig
object
safetySettings
object[]
systemInstruction
object
tools
object[]

Resposta

ok

Native Gemini response body. Refer to Google's official documentation for the authoritative field reference.