Gemini content generation (native format)
Call Gemini multimodal models (e.g. Nano Banana) with nativegenerateContent: text, images, and optional “thinking” traces.
Basics
- Endpoint:
POST /v1beta/models/{model}:generateContent/ - Path:
model— e.g.gemini-3-pro-image-preview. - Auth:
Bearer Token - Content-Type:
application/json
Request body
Response
200 OKExample (image)
Tips
- Thoughts:
includeThoughts: truesurfaces how the model interprets the prompt—useful for debugging complex prompts. - Multimodal: With both
TEXTandIMAGE, you often get explanatory text then the image. - Model id: Ensure
{model}matches what your key can access.

