Skip to content

Nano Banana image models

The public catalog lists gemini-nano-banana-2.1. Do not copy another platform’s alias such as nano-banana-pro without checking. Names, availability and prices are subject to the current catalog and key permissions.

The entry marks Gemini and OpenAI-compatible endpoint types. Confirm actual image input and output support on the route you intend to use. A text-only chat interface may not display a generated image even when the response contains one.

Confirm the native route and model permissions before using this example. If the endpoint is unsupported, check availability with support rather than retrying indefinitely:

Terminal window
curl 'https://wudiapi.com/v1beta/models/gemini-nano-banana-2.1:generateContent' \
-H "Authorization: Bearer $WUDI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"contents":[{"parts":[{"text":"Create a product photo of a blue ceramic cup on a white background"}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"]}}'

Native responses commonly contain text or inlineData in candidates[].content.parts[]. Image content includes mimeType and Base64 data. Decode the data and choose a matching file extension; do not save the complete JSON as an image.

Use the Images format only if the selected route explicitly provides it. A route returning multimodal content through Chat Completions needs a client that can parse those content blocks. These formats are not interchangeable.

For reference images, use the appropriate image content block described in editing. Test a simple single-image task first; the model name does not establish arbitrary dimensions, transparency or multi-image editing support.