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",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cyberpunk street scene with neon signs and rain",
"size": "16:9",
"resolution": "2K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10: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 Pro Image Generation
Image generation and editing for both classic Nano Banana 2 and the new Nano Banana Pro models
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",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cyberpunk street scene with neon signs and rain",
"size": "16:9",
"resolution": "2K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10: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 Pro Image Generation
This page documents both the legacynano-banana-2 models and the new nano-banana-pro models.
nano-banana-2/nano-banana-2-edit: classic Nano Banana 2 modelsnano-banana-pro/nano-banana-pro-edit: Nano Banana Pro models withoutput_format,enable_web_search, andsize=auto
Available Models
- nano-banana-2 - Text-to-image and image-to-image generation
- nano-banana-2-edit - Advanced image editing capabilities
- nano-banana-pro - Text-to-image generation with
output_format,enable_web_search, andsize=auto - nano-banana-pro-edit - Image editing with up to 14 reference images,
output_format,enable_web_search, andsize=auto
Nano Banana Pro Notes
sizesupportsautoand defaults toautoresolutionsupports1K,2K,4Koutput_formatsupportspngandjpgenable_web_searchsupportstrue/false
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 model identifier
Available options:
nano-banana-2, nano-banana-2-edit, nano-banana-pro, nano-banana-pro-edit Webhook callback URL for result notifications
Example:
"https://your-domain.com/callback"
Input parameters for generation
Show child attributes
Show child attributes
