Documentation

Gemini Image

Generate and edit images with Gemini-native content

POSThttps://api.tokenbyte.ai/v1beta/models/{model}:generateContent

Use contents[].parts for text and inline image data, and request image output through generationConfig.responseModalities. Supported aspect ratios, image sizes, and reference-image counts depend on the model.

curl "https://api.tokenbyte.ai/v1beta/models/<model-id>:generateContent" \
  -H "x-goog-api-key: $TOKENBYTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Create a product poster"}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"]}}'