Gemini-2.5-Flash-Image-preview (Nano banana)
Gemini-2.5-Flash Image Generation
Generate images using Google Gemini 2.5 Flash model, fast and efficient
POST
Documentation Index
Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
Use this file to discover all available pages before exploring further.
- Google Gemini 2.5 Flash efficient image generation model (Nano banana)
- Use model parameter to select
gemini-2.5-flash-image-previewmodel - Supports text-to-image generation
- Async task management, query results by task ID
Authorizations
All endpoints require Bearer Token authenticationGet your API Key from the API Key Management PageAdd to request header:
Body
Image generation model nameModel alias:
nano-bananaExample: "gemini-2.5-flash-image-preview"Text description for image generationMaximum 1000 characters
Image size ratioSupported formats:
| Value | Description | Pixels (Reference) |
|---|---|---|
1:1 | Square | 1024x1024 |
16:9 | Landscape wide | 1792x1024 |
9:16 | Portrait tall | 1024x1792 |
4:3 | Landscape standard | 1365x1024 |
3:4 | Portrait standard | 1024x1365 |
3:2 | Landscape photo | 1536x1024 |
2:3 | Portrait photo | 1024x1536 |
Number of images to generateFixed at 1⚠️ Note: Must be a pure number (e.g.
1), do not add quotes, otherwise it will errorList of reference image URLs for image-to-image or image editingLimit: Maximum 14 images
Metadata parameters for passing additional configuration options
Response
Unique task identifier for status queries
Object type, always
generation.taskModel name used
Task status
queued- Queued for processingin_progress- Processingcompleted- Successfully completedfailed- Failed
Task progress percentage (0-100)
Task creation timestamp (Unix timestamp)
Task metadata