Skip to content
NewRouters/Documentation
IMAGE API

nano-banana-pro · API guide

Integrate nano-banana-pro through the media task API. Request examples, parameters, authentication and result handling.

POST/v1/tasksMODELnano-banana-pro
Official reference gemini-3-pro-imageChecked 2026-09-27Official docs
Code examples & responses
Request & responseExamples
POST/v1/tasks
Server-side request
curl "https://newrouters.com/v1/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  --data '{
  "model": "nano-banana-pro",
  "input": {
    "resolution": "1k",
    "aspect_ratio": "auto",
    "output_format": "jpeg",
    "prompt": "A small red house in a quiet garden",
    "images": []
  }
}'

The API origin is filled in. Set API_KEY before running. Examples never submit automatically.

ResponseSelected fields · illustrative values
202Task accepted
JSON
{
  "id": "TASK_ID",
  "status": "pending",
  "model": "nano-banana-pro",
  "result": null,
  "error": null
}
200Successful result
JSON
{
  "id": "TASK_ID",
  "status": "succeeded",
  "model": "nano-banana-pro",
  "result": {
    "assets": [
      "https://example.com/output.png"
    ]
  },
  "error": null
}
Retrieve results after submission
Request lifecycleAsynchronous media
  1. Create a task01
    POST /v1/tasks

    Submit model + input. Save the returned task id.

    202 · pending
  2. Poll status02
    GET /v1/tasks/{id}

    Wait and poll again while pending or processing.

    Wait → poll again
  3. Read the outcome03
    result.assets[] / error

    Read the result for the terminal task state.

    succeeded→ assetsfailed→ error

Example outputs

View and try on the model page ↗

Generated through this API. Costs are the amounts charged on each task receipt.

Data-accurate infographic
Data-accurate infographic$0.06
Prompt and parameters

A refined editorial infographic poster titled "The Perfect Pour-Over". Clean dark charcoal background, cream and copper palette. Sections with exact labels and numbers: "Dose 15 g", "Water 250 g", "Ratio 1:16.7", "Temperature 93 °C", "Grind Medium-fine", "Bloom 30 s", "Total time 3:00". A precise cross-section illustration of a cone dripper with water flow arrows, and a simple timeline bar from 0:00 to 3:00 marking Bloom, First pour, Second pour, Drawdown. Swiss editorial typography, perfectly aligned grid, all text spelled exactly as written, no other text.

aspect_ratio: 3:4 · resolution: 2k · output_format: jpeg
Brand packaging system
Brand packaging system$0.06
Prompt and parameters

A premium brand packaging mockup for a fictional Chinese tea brand "山岚 SHANLAN". On a misty grey stone surface: a tall cylindrical tea tin, a matte paper pouch, a small gift box and a ceramic cup. Each item carries the logo "山岚" in elegant brush calligraphy and "SHANLAN TEA" in thin spaced capitals, plus a small label "Mountain Oolong · 高山乌龙 · 100g". Muted celadon, ink black and warm paper tones, soft diffused light, photorealistic. All text exactly as written.

aspect_ratio: 4:3 · resolution: 2k · output_format: jpeg
4K macro detail
4K macro detail$0.10
Prompt and parameters

Extreme macro photograph of an open mechanical watch movement: polished gears, blued screws, ruby jewels, a swinging balance wheel and fine Geneva stripes on the bridges. Razor-sharp focus stacking, warm workshop light from the left, deep black background, physically accurate metal reflections.

aspect_ratio: 16:9 · resolution: 4k · output_format: jpeg
Routing city
Routing city$0.06
Prompt and parameters

High-altitude oblique aerial view of a vast city at night rendered almost entirely dark, its street grid barely visible. A few dozen bright routes of warm gold light flow along the streets from many districts and converge into one luminous central plaza, then fan out again as fine white lines. Atmospheric haze, curvature of distant horizon, subtle cyan city glow on the far edge. Wide cinematic 16:9 frame. The subject sits in the right 60 percent of the frame; the left 40 percent is calm, deep near-black negative space reserved for a headline. Restrained palette: near-black #08090a, warm gold #f0b429 highlights, soft white and a hint of cool cyan. Photoreal, premium, minimal, physically plausible light, fine detail, gentle film grain. No text, no letters, no logos, no UI, no people.

aspect_ratio: 16:9 · resolution: 2k · output_format: jpeg

Use the exact API model ID nano-banana-pro. This guide describes the platform contract; check the live catalog before calling the model.

The platform origin is filled in at build time. Set API_KEY to your server-side key before running.

Terminal window
curl "https://newrouters.com/v1/tasks" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
--data '{
"model": "nano-banana-pro",
"input": {
"resolution": "1k",
"aspect_ratio": "auto",
"output_format": "jpeg",
"prompt": "A small red house in a quiet garden",
"images": []
}
}'

The creation response accepts a task, not the final output. Replace TASK_ID with its returned ID and poll until succeeded or failed.

Terminal window
curl "https://newrouters.com/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $API_KEY"

Read result on success and error on failure. Keep the original task ID when the upstream outcome is unknown; do not submit a duplicate paid generation.

FieldTypeRequirementDefaultConstraints
imagesarrayOptional[]—
promptstringRequired—max length 100000
resolutionenumOptional"1k"1k, 2k, 4k
aspect_ratioenumOptional"auto"auto, 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
output_formatenumOptional"jpeg"png, jpeg, webp

Checked: 2026-09-27 · Platform model: nano-banana-pro · Official reference: gemini-3-pro-image

Check current availability, contract and account pricing before integration. Keep request IDs and usage receipts when diagnosing errors. Complete API reference