Nano Banana 2 Lite
Overview
Nano Banana 2 Lite, aka Gemini 3.1 Flash-Lite Image, is a newly released image model from Google DeepMind built for fast 1K image generation, efficient creative iteration, prompt-based image editing, and responsive visual output in product-facing creative scenarios.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwithapi.online/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The input prompt (e.g., “a futuristic city”) |
| image_urls | array | Conditional | Provide 1-8 images when using image-to-image. |
| model_id | string | Yes | 0-56 |
| options | object | Yes | Configuration options for the task. Output resolution is fixed at 1K. |
| options.prompt_optimization | boolean | Yes | If true, all prompt words will be automatically translated into English. |
| options.aspect_ratio | string | Yes | Valid values: 'Auto' (Default), '1:1', '1:4', '1:8', '2:3', '3:2', '3:4', '4:1', '4:3', '4:5', '5:4', '8:1', '9:16', '16:9', '21:9'. |
Example Request (Text to Image)
{
"prompt": "a futuristic city",
"model_id": "0-56",
"options": {
"prompt_optimization": true,
"aspect_ratio": "Auto"
}
}Example Request (Image to Image)
{
"prompt": "make it anime style",
"image_urls": ["https://cdn.pixwithapi.online/example.jpg"],
"model_id": "0-56",
"options": {
"prompt_optimization": true,
"aspect_ratio": "Auto"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | 1=success, 0=error |
| message | string | Success and failure messages |
| data | object | |
| data.task_id | string | |
| data.estimated_time | int | Estimated time in seconds. |
Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 30
}
}Last updated on