Skip to content

Image Generation Overview ​

Currently, image generation is provided only through the Gemini-compatible Nano Banana family, supporting text-to-image and image-to-image workflows. For full parameters, see the Gemini API Guide.

Models & Billing ​

Model namingBillingExample
With -c suffixPer-requestgemini-3-pro-image-c
Without -c suffixToken-basedgemini-3-pro-image

Old fixed-resolution-suffix models have been retired. The suffix distinguishes billing modes, not fixed resolutions. List available models to confirm the full names accessible to your key. Prices and actual charges are determined by the console and your account bill.

Nano Banana Family ​

Model familyBackendNotes
gemini-3-pro-imageNano Banana ProPro family; quality and latency vary by request, with no absolute ranking
gemini-3.1-flash-imageNano Banana 2Flash family; validate quality and latency for your workload
gemini-nano-banana-2.1Nano Banana 2.1New Nano Banana model; consult model-specific capability information

This table introduces the families; it does not mean every key has access to every model.

Resolution ​

For models with -c, select 1K, 2K or 4K through generationConfig.imageConfig.imageSize. The default is 1K. Resolution is no longer selected through the model name.

For models without -c, confirm resolution-parameter support for the specific model. Do not reuse fixed-resolution rules from retired models.

Capabilities ​

The following describes integration patterns, not a uniform capability guarantee across all models. Nano Banana 2.1 aspect ratios, reference-image limits and resolution support remain unconfirmed; do not apply other models' rules to it.

CapabilitySupport
Text-to-imageYes
Image-to-image / editingSupply references through inlineData; confirm multi-image support and limits per model
Aspect ratiosConfirm per model; not a blanket promise of 14 ratios. See Pro's extreme-ratio limitations
StreamingNon-streaming is recommended for IMAGE generation; see historical behavior and scope
Images per requestExamples handle one image; do not rely on candidateCount for multiple images
Response formatIMAGE examples use base64 in inlineData; use the actual response mimeType
Usage statisticsNon-streaming responses include usageMetadata; usage does not determine the billing mode

Integration ​

POST /v1beta/models/{model}:generateContent

Image generation requires explicit IMAGE output

generationConfig.responseModalities must explicitly include "IMAGE"; use ["IMAGE"]. The backend supports TEXT mode for fast initial text responses. If omitted or set to TEXT only, Pro models may generate text.

The default endpoint is https://api.llmnex.com; the Hong Kong acceleration endpoint is https://hk.llmnex.com. Change only the base URL and keep the API path unchanged. See Endpoints & Authentication.

Typical Latency ​

Image generation is significantly faster than before. These typical times are references, not latency guarantees.

ResolutionTypical time to first byte
1KAbout 15–25 seconds
2KAbout 15–35 seconds
4KAbout 20–45 seconds

These are server generation times, excluding image transfer. Peak-time requests may take longer. Use a 300-second client timeout, or 600 seconds for 4K over a slow connection.

LLMNEX · Model Integration Guide