POST
https://your-instance.com/v1beta/models/{model}:generateContentGemini's own request format, passed through. The streaming variant is :streamGenerateContent, and both take the same body.
Authentication
Three credential styles are accepted here: an x-goog-api-key header, a normal bearer token, or a key query parameter. Prefer one of the headers — a key in the URL tends to end up in proxy logs and browser history.
curl "https://your-instance.com/v1beta/models/gemini-3-pro:generateContent" \
-H "x-goog-api-key: $CLAWROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{"parts": [{"text": "Explain photosynthesis briefly."}]}
]
}'Streaming
curl
curl "https://your-instance.com/v1beta/models/gemini-3-pro:streamGenerateContent" \
-H "x-goog-api-key: $CLAWROUTER_API_KEY" \
-H "Content-Type: application/json" \
-N \
-d '{"contents":[{"parts":[{"text":"Count to ten."}]}]}'