Get Task Details
curl --request GET \
--url https://api.nanobananaapi.ai/api/v1/nanobanana/record-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nanobananaapi.ai/api/v1/nanobanana/record-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nanobananaapi.ai/api/v1/nanobanana/record-info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nanobananaapi.ai/api/v1/nanobanana/record-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "nanobanana_task_123456",
"paramJson": "",
"completeTime": "",
"response": {
"originImageUrl": "https://bfl.com/image/original.jpg",
"resultImageUrl": "https://ourserver.com/image/result.jpg"
},
"successFlag": 1,
"errorCode": 0,
"errorMessage": "",
"createTime": ""
}
}{
"code": 400,
"msg": "Parameter error"
}{
"code": 401,
"msg": "Unauthorized"
}{
"code": 404,
"msg": "Task not found"
}{
"code": 500,
"msg": "Server internal error"
}NanoBanana API
Get Task Details
Query NanoBanana task execution details and status.
GET
/
api
/
v1
/
nanobanana
/
record-info
Get Task Details
curl --request GET \
--url https://api.nanobananaapi.ai/api/v1/nanobanana/record-info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nanobananaapi.ai/api/v1/nanobanana/record-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nanobananaapi.ai/api/v1/nanobanana/record-info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nanobananaapi.ai/api/v1/nanobanana/record-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"taskId": "nanobanana_task_123456",
"paramJson": "",
"completeTime": "",
"response": {
"originImageUrl": "https://bfl.com/image/original.jpg",
"resultImageUrl": "https://ourserver.com/image/result.jpg"
},
"successFlag": 1,
"errorCode": 0,
"errorMessage": "",
"createTime": ""
}
}{
"code": 400,
"msg": "Parameter error"
}{
"code": 401,
"msg": "Unauthorized"
}{
"code": 404,
"msg": "Task not found"
}{
"code": 500,
"msg": "Server internal error"
}Query the status and results of a NanoBanana image generation or editing task.
Status Descriptions
- 0: GENERATING - Task is currently being processed
- 1: SUCCESS - Task completed successfully
- 2: CREATE_TASK_FAILED - Failed to create the task
- 3: GENERATE_FAILED - Task creation succeeded but generation failed
Usage Guide
- Use this endpoint to check the current status of your generation task
- Monitor task progress using the
successFlagfield - Retrieve generated image URLs when task is completed successfully
- Handle error cases using
errorCodeanderrorMessagefields
Developer Notes
- Task ID is obtained from the Generate or Edit Image endpoint response
- Generated images URLs are available when
successFlagis 1 (SUCCESS) - Original image URL (
originImageUrl) from BFL is valid for 10 minutes only - Result image URL (
resultImageUrl) on our server has longer availability
Authorizations
All APIs require authentication via Bearer Token.
Get API Key:
- Visit API Key Management Page to get your API Key
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
- Keep your API Key secure and do not share it with others
- If you suspect your API Key has been compromised, reset it immediately in the management page
Query Parameters
Task ID (required)