cURL
Nano Banana
Nano Banana Image Generation API | Nano Banana, Nano Banana 2, Nano Banana Pro
Generate images with the Nano Banana API using Nano Banana, Nano Banana 2, and Nano Banana Pro, including official Gemini model names such as gemini-2.5-flash-image, gemini-3-pro-image-preview, and gemini-3.1-flash-image-preview.
POST
cURL
Use this endpoint when you want the main Nano Banana API image generation workflow for Nano Banana, Nano Banana 2, or Nano Banana Pro.
For the full family overview and model comparison, see the Nano Banana API overview and the Nano Banana Models Guide.
Since Nano Banana image generation is a synchronous response and takes a relatively long time, it is recommended to use the https://api.ttapi.org gateway.
Available Models
| Model | Alias |
|---|---|
gemini-2.5-flash-image | Nano Banana |
gemini-2.5-flash-image-preview | Nano Banana |
gemini-3-pro-image-preview | Nano Banana Pro |
gemini-3.1-flash-image-preview | Nano Banana 2 |
Authorizations
You can obtain your API key from the TTAPI Dashboard.
Body
application/json
Image description for generation or modification
Model version
Available options:
gemini-2.5-flash-image-preview, gemini-2.5-flash-image, gemini-3-pro-image-preview, gemini-3.1-flash-image-preview List of reference images
Example:
[
"https://cdn.ttapi.io/xxx1.png",
"https://cdn.ttapi.io/xxx2.png"
]Image aspect ratio, only supported by gemini-3 and above
Available options:
1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, 1:8, 8:1 Image resolution. Note: Use uppercase 'K'
Available options:
1K, 2K, 4K Whether to enable Google web search
Whether to enable Google image search
Thinking level
Available options:
Minimal, High Last modified on April 14, 2026