Build with the Nano Banana Pro API using APIDot: cURL, Node.js, polling, webhooks, pricing, and fal.ai comparison in one production-oriented GitHub repo.
Get API Key | API Docs | Model Page | Main Examples
Use Nano Banana Pro when image quality, text fidelity, subject consistency, and production-ready 4K output matter more than pure speed. nano-banana-pro handles prompt-based generation, nano-banana-pro-edit handles guided editing, and both run on the same APIDot async workflow.
This repository turns that workflow into runnable server-side examples: a verified cURL request, a native Node.js polling example, webhook receiver notes, prompt examples, pricing context, and production integration guardrails.
Nano Banana Pro is Google DeepMind's high-fidelity image generation and editing model, commonly associated with Gemini 3 Pro Image. Built on Gemini 3 image capabilities, it represents a higher-end step in the Nano Banana line, with more emphasis on output quality, control, and professional delivery than on fast draft generation alone.
Nano Banana Pro is especially strong at cleaner text rendering inside images, more reliable character and subject consistency, more natural semantic editing, and overall image quality that is better suited for commercial-ready assets. It is a strong fit for product visuals, ad creative, posters, infographic-style graphics, realistic mockups, and tasks that need to preserve structure while changing style, background, or local details, making it better suited to final delivery than lighter and faster variants.
The advantage of using Nano Banana Pro through APIDot is not only access to a higher-quality model, but also a more unified, production-friendly integration path for both generation and editing. nano-banana-pro and nano-banana-pro-edit share the same Bearer-token auth flow, async submit/status/callback pattern, and clear credits-based pricing structure, which reduces the need to maintain separate backend logic for different modes. APIDot also keeps practical controls such as reference-image inputs, png / jpg output selection, and enable_web_search available in the same workflow, making it easier to connect higher-quality image generation, controlled editing, and backend orchestration to real products, creative pipelines, and automation systems.
- Using Gemini 3 Pro Image for high-fidelity visual generation: Nano Banana Pro API uses Gemini 3 Pro Image capabilities to produce sharper structure, cleaner materials, and more polished image detail. It is designed for image outputs where fidelity, lighting, texture, and composition need to hold up beyond rough concept exploration.
- Through 4K-ready rendering for detailed production assets: Nano Banana Pro supports higher-resolution image generation up to 4K, making it suitable for product visuals, campaign assets, presentation graphics, and high-detail creative work. The model is especially useful when small texture, edge quality, and overall visual clarity affect the final result.
- Using stronger text rendering for readable in-image copy: Nano Banana Pro improves text handling inside generated images, including labels, signs, poster headlines, interface-style text, and infographic annotations. This makes it more useful for visuals where the written information needs to be understood, not just suggested.
- Based on visual reasoning for structured and knowledge-aware scenes: Nano Banana Pro can follow more complex visual instructions and organize scenes with stronger logical structure. This helps when generating diagrams, educational graphics, annotated illustrations, data-inspired visuals, or scenes that depend on real-world relationships.
- Through reference images for controlled editing and identity preservation: With reference images, the nano-banana-pro-edit editing model can preserve important subjects, composition, and visual identity while changing background, style, lighting, color, or local details. It supports natural-language editing for controlled image updates without requiring every change to be planned as a manual mask operation.
- Supporting consistent subjects across characters, objects, and scenes: Nano Banana Pro is stronger at keeping people, products, objects, and style cues stable across variations. This matters for character sets, product angle variations, brand visuals, multi-object layouts, and scene sequences that need continuity.
Nano Banana Pro is most useful when the job depends on higher-end output quality, strong text rendering, controlled edits, or optional web-aware prompt augmentation in the same async workflow.
- Premium ecommerce product visuals and hero shots
- Marketing creatives with readable in-image text
- Infographics, diagrams, and presentation visuals
- Brand-consistent edits of existing images
- UI concepts and screenshot-style product mockups
- Current-event or product-aware visual generation
Catalog price: $0.090 / generation. Pricing snapshot: per generation | Official 1K/2K: 18 credits ($0.09) | Official 4K: 35 credits ($0.175)
This README uses the pricing data currently published in the APIDot model catalog. Check the APIDot model page before high-volume production runs.
- nano-banana-pro: per generation | Official 1K/2K: 18 credits ($0.09) | Official 4K: 35 credits ($0.175)
- nano-banana-pro-edit: per generation | Official 1K/2K: 18 credits ($0.09) | Official 4K: 35 credits ($0.175)
For tiers with fal.ai comparison data in the APIDot catalog, APIDot shows up to 42% lower listed price. Treat this as a catalog snapshot and verify current pricing before launch.
| Tier | APIDot listed price | fal.ai listed price | Note |
|---|---|---|---|
| Text to Image (Official 1K/2K) | $0.09 | $0.15 | APIDot is 40% lower in this tier |
| Text to Image (Official 4K) | $0.175 | $0.3 | APIDot is 42% lower in this tier |
| Image Edit (Official 1K/2K) | $0.09 | $0.15 | APIDot is 40% lower in this tier |
| Image Edit (Official 4K) | $0.175 | $0.3 | APIDot is 42% lower in this tier |
cp .env.example .env
# Edit .env and set APIDOT_API_KEY
cd node
npm start
The same request shape is available as a copy-paste cURL example in curl/generate.md.
flowchart LR
A[Submit generation request] --> B[Receive data.task_id]
B --> C{Delivery mode}
C -->|Polling| D[Check task status]
C -->|Webhook| E[Receive callback_url event]
D --> F[Read result URL from finished task]
E --> F
Use polling for local tests and webhook delivery for production queues. Store data.task_id before the first status check so retries, callbacks, and result URLs can be reconciled safely.
Submit to APIDot's unified async generation endpoint:
POST https://api.apidot.ai/api/generate/submit
Authorization: Bearer <APIDOT_API_KEY>
Content-Type: application/json
Primary payload:
{
"model": "nano-banana-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Studio-quality product photography of a premium wireless earbuds case in matte titanium finish with subtle engraving 'Aether Audio', floating above a reflective black marble surface with dramatic side lighting and soft rim light. Cinematic 85mm lens, shallow depth of field, hyper-realistic textures on metal and silicone tips, commercial advertising style, 4K resolution, clean minimalist background.",
"resolution": "1K",
"size": "auto",
"output_format": "png",
"enable_web_search": false
}
}Generate or edit premium images with Nano Banana Pro through APIDot's unified async submit endpoint.
This page documents the Pro-only Nano Banana workflow on APIDot. Use nano-banana-pro for premium prompt-driven generation and use nano-banana-pro-edit for guided editing with one or more reference image URLs. Both variants use the same async submit, status, and callback flow.
{
"model": "nano-banana-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Studio-quality product photography of a premium wireless earbuds case in matte titanium finish with subtle engraving 'Aether Audio', floating above a reflective black marble surface with dramatic side lighting and soft rim light. Cinematic 85mm lens, shallow depth of field, hyper-realistic textures on metal and silicone tips, commercial advertising style, 4K resolution, clean minimalist background.",
"resolution": "1K",
"size": "auto",
"output_format": "png",
"enable_web_search": false
}
}{
"model": "nano-banana-pro-edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Replace the clothing with a tailored modern fashion look in a luxury editorial style, but preserve the subject's facial identity, hairstyle, skin tone, body proportions, pose, and camera framing. Keep the lighting direction natural and consistent, and make the final image feel like a premium magazine campaign with clean styling and realistic fabric texture.",
"resolution": "4K",
"size": "16:9",
"output_format": "png",
"enable_web_search": false,
"image_urls": [
"https://your-domain.com/source-image.png"
]
}
}| Field | Type | Required | Description |
|---|---|---|---|
| model | string | yes | Target model id. Use nano-banana-pro or nano-banana-pro-edit. |
| callback_url | string | no | Optional webhook callback URL for terminal task updates. |
| input | object | yes | Container for Nano Banana Pro generation or editing parameters. |
| input.prompt | string | yes | Main instruction describing the target image, edit intent, composition, style, and any text requirements. |
| input.resolution | string | no | Resolution preset. Supported values: 1K, 2K, 4K. |
| input.size | string | no | Output size preset. Supported values: auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. |
| input.output_format | string | no | Output file format. Supported values: png, jpg. |
| input.enable_web_search | boolean | no | Whether to pull fresh web context before generation. |
| input.image_urls | string[] | no | Reference image URLs. Required for nano-banana-pro-edit. |
- Be explicit about composition, subject identity, typography, and any visual details that must survive to the final asset.
- Use
nano-banana-pro-editonly when you are sending one or moreinput.image_urlsreference images for controlled edits. - Use
input.resolution,input.size,input.output_format, andinput.enable_web_searchtogether so the request matches your intended quality and delivery workflow. - Store the returned
task_idimmediately so polling, retries, webhooks, and downstream processing stay idempotent.
APIDot media generation is asynchronous. Store data.task_id immediately after submit, poll /api/generate/status/{task_id} for local tests, and use callback_url webhooks for production queues where users may leave the page before completion.
Webhook handlers should verify task ownership, persist callback events, return 2xx quickly, and be idempotent because duplicate deliveries can happen.
- code: HTTP-style status code. Successful submits return
200. - data.task_id: Async task identifier returned immediately after submission.
- data.status: Initial task status, typically
not_started. - data.created_time: ISO 8601 timestamp for task creation.
Common error classes:
- 400 invalid_request: Missing prompt, unsupported model, invalid resolution, invalid size, invalid output format, malformed
enable_web_search, or a missingimage_urlsarray fornano-banana-pro-edit. - 401 authentication_error: Missing, expired, or invalid Bearer API key.
- 402 insufficient_credits: The current prepaid balance cannot cover the estimated image generation cost.
- 429 rate_limited: The API key is temporarily above the allowed submit rate.
- Keep APIDot API keys in server-side environment variables.
- Persist task_id, selected model, request payload, user ID, and status together.
- Use a moderate polling interval for tests and webhooks for durable production callbacks.
- Validate source media URLs before submitting requests that depend on source files.
- Avoid logging API keys, private prompts, private media URLs, or callback URLs.
- Retry transient network failures with backoff, but do not retry unchanged invalid payloads.
nano-banana-pro is the primary generation variant for prompt-based image creation, including image-to-image style generation when no edit-only constraints are needed. nano-banana-pro-edit is the guided editing variant for requests that include one or more reference image URLs and need more controlled changes.
Use it when the prompt depends on newer products, public events, topical references, or fresher real-world context. If the image is purely fictional or brand-internal, you can usually leave it off.
Nano Banana Pro supports png and jpg. Use png when you want less lossy output or more post-processing flexibility, and use jpg when smaller file size matters more.
Yes. nano-banana-pro-edit should include at least one image_urls item because the model needs source imagery to preserve composition, identity, or product structure while making controlled edits.
Official 1K/2K text generation and image editing cost 18 credits per request. Official 4K text generation and image editing cost 35 credits per request. The same price structure applies to the generation and edit variants.
Choose Nano Banana Pro when the output is meant to be closer to a final asset rather than a rough draft. It is the better fit for readable text, branded visuals, product imagery, presentation-ready creative, and higher-resolution delivery. Faster Nano Banana variants are usually better for quick ideation, lower-cost iteration, or early prompt exploration.
Yes. Stronger text rendering is one of the main reasons to use Nano Banana Pro, especially for posters, labels, UI-style copy, diagrams, and infographic-like layouts. Even so, more complex layouts or dense copy may still need a few iterations and a final human review before shipping.
Yes, especially when you use reference images or work in nano-banana-pro-edit. It is well suited for keeping a person, product, packaging system, or overall composition more stable across multiple variations while still allowing controlled changes to background, styling, or local details.
Use nano-banana-pro for standard premium generation. Use nano-banana-pro-edit when the request includes one or more input.image_urls items and needs controlled editing behavior.
It allows the request to pull fresher web context before generation, which is useful for current products, events, and other prompts that benefit from more recent real-world information.
Yes. Nano Banana Pro supports input.output_format with png and jpg.
Yes. nano-banana-pro-edit should include at least one input.image_urls entry because the model needs source imagery for guided edits.
No. This is an APIDot integration repository for calling Nano Banana Pro through APIDot. Google is listed as the model provider in the APIDot catalog. Use the APIDot model page for current availability, pricing, and usage terms.
- APIDot: https://apidot.ai
- Nano Banana Pro model page: https://apidot.ai/models/nano-banana-pro
- Nano Banana Pro API docs: https://apidot.ai/docs/nano-banana-pro
- APIDot quickstart: https://apidot.ai/docs/quickstart
- APIDot webhooks: https://apidot.ai/docs/webhooks
- Main APIDot examples repo: https://github.com/APIDotAI/apidot-examples
More image API examples from APIDot:
| Model | Repository |
|---|---|
| GPT Image 2 | gpt-image-2-api |
| Nano Banana 2 | nano-banana-2-api |
| Seedream 4.5 | seedream-4.5-api |