curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "nano-banana-2-lite",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A small red cube on a plain white background",
"size": "1:1"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-07-01T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}Google
Nano Banana 2 Lite Image Generation
Google’s fastest and most cost-efficient Gemini Image model for rapid ideation, low-latency creative drafts, and high-throughput image generation
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "nano-banana-2-lite",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A small red cube on a plain white background",
"size": "1:1"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-07-01T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the response result through the unified Query Task Status endpoint.
Nano Banana 2 Lite Image Generation
Nano Banana 2 Lite is Google’s fastest and most cost-efficient Gemini Image model, corresponding to Gemini 3.1 Flash Lite Image. It is designed for rapid ideation, low-latency creative drafts, high-throughput generation, and scaled image pipelines where speed and cost matter most.Available Models
- nano-banana-2-lite - Text-to-image generation
- nano-banana-2-lite-edit - Image editing with reference images
Input Parameters
prompt- Required. Text instruction for the generated or edited image.image_urls- Required fornano-banana-2-lite-edit. Not supported fornano-banana-2-lite.size- Optional aspect ratio. If omitted, no explicit output aspect ratio is specified.
size values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.
Text-to-Image Example
{
"model": "nano-banana-2-lite",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A small red cube on a plain white background",
"size": "1:1"
}
}
Image Editing Example
{
"model": "nano-banana-2-lite-edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Change the background to a clean pale blue studio backdrop",
"image_urls": ["https://example.com/source-image.png"],
"size": "1:1"
}
}
Authorizations
All API endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Nano Banana 2 Lite model identifier
Available options:
nano-banana-2-lite, nano-banana-2-lite-edit Input parameters. image_urls is required for nano-banana-2-lite-edit and is not supported for nano-banana-2-lite.
Show child attributes
Show child attributes
Webhook callback URL for result notifications
Example:
"https://your-domain.com/callback"
