🎉

🎉 Nano Banana 2 is Now Available!

Try Now

Text-to-Image

Generate images from text prompts.

POST
https://nanobnana.com/api/generate

Generate an image based on a text prompt.

Headers

Content-Type
application/json
Authorization
Bearer ${your-api-key-here}
Get your API Key in API Keys

Request Body

JSON
1
{
2
"prompt": "A fantasy landscape, trending on artstation"
3
}
Response

Successful response with the task ID and status.

Response Schema

JSON
1
{
2
"code": 200,
3
"message": "success",
4
"task_id": "nanosdkajkhf123jagndkfnksnkfban"
5
}
Get task_id from response, then query task result from Query Tasks Result