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.1",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A warm sunlit studio portrait of an orange cat",
"size": "1:1",
"resolution": "1K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-10-08T10: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.1 Image Generation
Create and edit images with Nano Banana 2.1
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.1",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A warm sunlit studio portrait of an orange cat",
"size": "1:1",
"resolution": "1K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-10-08T10: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, a POST request will be sent when the task status becomesfinishedorfailed. - You can also retrieve the result through Query Task Status.
Nano Banana 2.1 Image Generation
Usenano-banana-2.1 for text-to-image generation. Add image_urls to edit one or more reference images with the same model ID. The model supports up to 10 reference images.
Available Models
- nano-banana-2.1 - Text-to-image and image-to-image generation
resolution is 1K. For text-to-image generation, size defaults to 1:1. When image_urls are provided, size defaults to auto, allowing the model to choose an aspect ratio from the reference images. You can also select a supported ratio explicitly. The auto option is only available for image editing.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
