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 naming | Billing | Example |
|---|---|---|
With -c suffix | Per-request | gemini-3-pro-image-c |
Without -c suffix | Token-based | gemini-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 family | Backend | Notes |
|---|---|---|
gemini-3-pro-image | Nano Banana Pro | Pro family; quality and latency vary by request, with no absolute ranking |
gemini-3.1-flash-image | Nano Banana 2 | Flash family; validate quality and latency for your workload |
gemini-nano-banana-2.1 | Nano Banana 2.1 | New 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.
| Capability | Support |
|---|---|
| Text-to-image | Yes |
| Image-to-image / editing | Supply references through inlineData; confirm multi-image support and limits per model |
| Aspect ratios | Confirm per model; not a blanket promise of 14 ratios. See Pro's extreme-ratio limitations |
| Streaming | Non-streaming is recommended for IMAGE generation; see historical behavior and scope |
| Images per request | Examples handle one image; do not rely on candidateCount for multiple images |
| Response format | IMAGE examples use base64 in inlineData; use the actual response mimeType |
| Usage statistics | Non-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.
| Resolution | Typical time to first byte |
|---|---|
| 1K | About 15–25 seconds |
| 2K | About 15–35 seconds |
| 4K | About 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.