Get Started
Quick Start
Jump into using Nano Banana API with a Bearer token, JSON request body, and the two production endpoints: create and check.
What You Need
- AA Nano Banana account with available credits
- An API key created from the API Keys dashboard
Get Your API Key
Sign in, open the API Keys page, enter a key name, and click Create. Copy the key immediately; the full key is only shown once.
Configure Your HTTP Request Header
Base URL
https://nanobanana.ioAuthorization: Bearer sk_live_your_api_key
Content-Type: application/jsonQuickstart
Submit a JSON payload to create an asynchronous generation task. Save the returned task_id and use it to check the task status.
POST /api/v1/createcurl -X POST https://nanobanana.io/api/v1/create \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"input": {
"prompt": "A cinematic product photo of a futuristic banana-shaped camera",
"aspect_ratio": "1:1",
"resolution": "1k"
}
}'Response{
"data": {
"task_id": "d0a8d9f2-5e01-4c5d-9f40-38d197a1c617",
"model": "nano-banana-2",
"status": "processing",
"credits": 20
}
}Create a Task
Submit a model id and an input object to create an asynchronous generation task. This endpoint confirms that the task has been queued; it does not wait for the final media result.
/api/v1/createAuthorizations
AuthorizationstringrequiredAuthorization: Bearer sk_live_your_api_keyRequest body
application/jsonmodelstringrequiredinputobjectrequiredprompt. Other input fields are model-specific; refer to the corresponding model documentation before sending fields such as images, aspect ratio, duration, resolution, or count.JSON{
"model": "nano-banana-2",
"input": {
"prompt": "A cinematic product photo of a futuristic banana-shaped camera",
"aspect_ratio": "1:1",
"resolution": "1k"
}
}Create response
application/jsonA successful response returns the task id, model id, queued status, and the number of credits reserved for this task.
HTTP 201{
"data": {
"task_id": "d0a8d9f2-5e01-4c5d-9f40-38d197a1c617",
"model": "nano-banana-2",
"status": "processing",
"credits": 20
}
}Get Task Status
Poll this endpoint using the returned task ID until the task is completed or failed. We recommend polling every 5 seconds to check the latest task status.
/api/v1/checkRequest body
application/jsontask_idstringrequiredJSON{
"task_id": "d0a8d9f2-5e01-4c5d-9f40-38d197a1c617"
}Status response
application/jsonWhen processing is complete, the response includes final result URLs and timing metadata. While the task is still running, data is returned as null.
HTTP 200{
"id": "adc0e6ec-9c12-44fc-b45f-112187766c3",
"created_at": 1788652800,
"model": "nano-banana-2",
"status": "completed",
"data": {
"results": [
"https://cdn.nanobanana.io/api/predictions/example.mp4"
],
"processing_time": 48
}
}