Nano Banana Pro

POSThttps://api.newportai.com/api/async/google_gemini_image

The Nano Banana Pro API harnesses the Gemini 3 Pro Image model for premium, high-fidelity image generation from text prompts. It delivers superior image quality with support for 1K and 2K resolutions.

  • Submit a POST request with your text prompt and configuration to obtain a taskId.
  • Submit a POST request to the Polling API with the taskId to retrieve the generated images.
  • Configure a Callback URL to receive results automatically on completion.

Request Headers

Content-Type string Required

Enum: application/json

Authorization string Required

Bearer authentication token. Example: Bearer {{APIKey}}.

Request Body

model string Required

The model identifier. Must be set to gemini-3-pro-image for Nano Banana Pro.

text string Required

The text prompt describing the image to generate. Example: "The kitten is eating".

imageSize string Optional

The output image resolution. Supported values for Nano Banana Pro: "1K", "2K". Default: "1K".

aspectRatio string Optional

The aspect ratio of the generated image. Example: "16:9", "1:1", "4:3".

images array[string] Optional

An array of reference image URLs for image-to-image generation. Can be empty or omitted.

Response

code integer

Returns 0 for success, or a specific error code.

message string

Returns "success" or a descriptive error message.

data object
taskId string

The unique identifier for the task. Use this ID with the Polling API to retrieve the generated output.

Errors

10192Illegal param. One or more request parameters are invalid or missing.

Polling

Use the Polling API to retrieve the processing results.

Callback

Alternatively, you can enable Callback to receive task results automatically upon completion.

0Task Completed
{
    "code": 0,
    "message": "success",
    "data": {
        "task": {
            "taskId": "API-605f75923ff64b998955ba46f13915f2",
            "status": 3,
            "executionTime": 26446,
            "expire": 1778593345400,
            "taskType": "google_gemini_image"
        },
        "images": [
            {
                "imageUrl": "https://dreamface-resource.oss-us-east-1.aliyuncs.com/df-ability-tmp/0a2f83e6-21e7-47c7-ab50-74457845d628.jpeg",
                "imageType": "png"
            }
        ]
    }
}
Request
cURL
curl -X POST 'https://api.newportai.com/api/async/google_gemini_image' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {{APIKey}}' \
  -d '{
  "model": "gemini-3-pro-image",
  "text": "The kitten is eating",
  "aspectRatio": "16:9",
  "imageSize": "1K",
  "images": [
    "https://d2t5pyzt5qvy2d.cloudfront.net/api/static_resource/prod/default/INj5UrnnrKIzCR1uYBWv0.png"
  ]
}'
0Successful
{
    "code": 0,
    "message": "success",
    "data": {
        "taskId": "API-605f75923ff64b998955ba46f13915f2"
    }
}