Skip to main content
POST
/
v1beta
/
models
/
{model}
:generateContent
Gemini Native (Image)
curl --request POST \
  --url https://api.gravitex.ai/v1beta/models/{model}:generateContent \
  --header 'Authorization: <authorization>'

Documentation Index

Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt

Use this file to discover all available pages before exploring further.

Introduction

Gemini images can be requested via:
  • Gemini native: POST /v1beta/models/{model}:generateContent with responseModalities: ["IMAGE"] and imageConfig
  • OpenAI-compatible: POST /v1/images/generations — see Nano Banana — or POST /v1/chat/completions for some models

Authentication

Authorization
string
required
Bearer Token, e.g. Bearer sk-xxxxxxxxxx

Request examples

curl -X POST "https://api.gravitex.ai/v1beta/models/gemini-2.5-flash-image:generateContent" \
  -H "Authorization: Bearer sk-xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"role": "user", "parts": [{"text": "A cute orange cat in a garden, photo quality"}]}],
    "generationConfig": {
      "responseModalities": ["IMAGE"],
      "imageConfig": {"aspectRatio": "16:9", "imageSize": "2K"}
    }
  }'
See Gemini native format and Nano Banana.