Skip to main content
For the newer image model, use Nano Banana 2.1 with ID gemini-nano-banana-2.1. Its minimum output tier is 1K and default thinking level is MEDIUM. The examples below remain for gemini-3.1-flash-image; account-specific availability follows the model list.
Gemini 3.1 Flash Image is available through the native image API described below. Uses the native Gemini Content/Part structure. Request IMAGE output and read the returned image parts rather than treating the response as a text-only chat completion. POST https://api.mixroute.ai/v1/models/gemini-3.1-flash-image:generateContent

Examples

Use your MixRoute key in the MIXROUTE_API_KEY environment variable. Requests use Authorization: Bearer .... Replace source-image placeholders with accessible images or local files before editing.

Python

Parameters and Limits

Put the model ID in the request URL and send prompts or image parts in contents. Use generationConfig.responseModalities for the requested output modalities. Use only the image sizes and options listed for this version in the image API reference.

API Reference

Endpoint availability depends on your API key’s group.