Saltar al contenido principal
POST
Generate Content

Autorizaciones

x-goog-api-key
string
header
requerido

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 ruta

model
string
requerido

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

Cuerpo

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[]

Respuesta

ok

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