Gemini Generate Content

Gemini Generate Content

Gemini-compatible routes are available on the gateway root under /v1beta/models/{model}:generateContent.

Recommended for Gemini / Google models only. For all other models, use the OpenAI Chat Completions endpoint.

Example

curl "$GATEWAY_URL/v1beta/models/gemini-2.0-flash:generateContent" \
  -H "Authorization: Bearer sk-or-..." \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{
      "parts": [{"text": "Hello"}]
    }]
  }'

Refer to Google's Gemini REST reference for optional generation parameters. Model IDs must be enabled on your gateway deployment — see the Models page for the live catalog.