Skip to main content

Gemini content generation (native format)

Call Gemini multimodal models (e.g. Nano Banana) with native generateContent: 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 OK

Example (image)


Tips

  1. Thoughts: includeThoughts: true surfaces how the model interprets the prompt—useful for debugging complex prompts.
  2. Multimodal: With both TEXT and IMAGE, you often get explanatory text then the image.
  3. Model id: Ensure {model} matches what your key can access.