Skip to main content

image models

Nano Banana 2.1 API|图像生成与编辑 / — 图像生成与编辑

通过 PiAPI 使用 Google Gemini Nano Banana 2.1,支持文生图与参考图编辑,并可选择 1K、2K、4K 输出。

立即开始!

Nano Banana 2.1 API 定价

按分辨率选择 Nano Banana 2.1 档位:1K、2K 或 4K。

Nano Banana 2.1 · 1K

$0.03 每张图

  • Text-to-image and image editing

Nano Banana 2.1 · 2K

$0.04 每张图

  • Text-to-image and image editing

Nano Banana 2.1 · 4K

$0.09 每张图

  • Text-to-image and image editing

为什么选择 Nano Banana 2.1?

使用同一份 PiAPI 请求契约完成生成、编辑与历史记录。

Lightning Fast Speed

Nano Banana 2.1 produces output at lightning-fast speed, making it a strong fit for rapid creative and production workflows.

Advanced Real-World Knowledge

Nano Banana 2.1 grounds generations in current information to create more accurate diagrams, layouts, and data-driven visuals.

Precise Text Rendering and Translation

Nano Banana 2.1 performs strongly on text rendering and multilingual use cases, helping teams create cleaner visual assets with embedded text.

Flexible Configuration

Generate production-ready outputs with flexible aspect ratios, multiple formats, and resolutions up to 4K.

Subject Consistency

Support for character and object references helps preserve consistency across complex scenes.

Precise Instruction Following

Nano Banana 2.1 follows creative instructions closely, giving teams more control over image generation and editing tasks.

Upgraded Visual Fidelity

Expect richer textures, stronger lighting, and sharper details across outputs, from quick previews to polished assets.

SOTA Performance

Nano Banana 2.1 delivers high-fidelity image generation and image editing for production workflows.

Production-Ready Workflow

Use the PiAPI Playground to test Nano Banana 2.1, then ship the same request shape through the unified API.

Integrate in Minutes

Create your API key

Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.

Top up credits

Add credits on the billing page when you are ready to scale beyond the free tier.

Call the API

POST your first task following the API docs, then poll the task until the result is ready.

Iterate in the playground

Prototype prompts and settings in the the playground above before wiring them into your product.

Create a task

curl -X POST 'https://api.piapi.ai/api/v1/task' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gemini",
  "task_type": "nano-banana-2.1",
  "input": {
    "prompt": "A modern smartphone on a reflective surface with water droplets.",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "output_format": "png"
  }
}'

Retrieve the result

curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
  -H 'X-API-Key: YOUR_API_KEY'

image_urls / image_url

Pricing

  • 1K: $0.03 / image
  • 2K: $0.04 / image
  • 4K: $0.09 / image

Nano Banana 2.1 常见问题

Nano Banana 2.1 支持哪些分辨率?

支持 1K、2K 和 4K,并可选择 API 支持的宽高比与 PNG 或 JPG 输出。

Nano Banana 2.1 可以编辑图片吗?

可以。上传 image_urls 并提供提示词即可使用图生图编辑;文生图只需要提示词。

如何使用 Nano Banana 2.1 API?

请求中使用 model=gemini 与 task_type=nano-banana-2.1,创建任务后轮询结果。

Is there free access to try Nano Banana 2.1?

When you first sign up in PiAPI's Workspace, you can use free credits to try Nano Banana 2.1 in the playground.

Are there refunds?

No, we do not offer refunds. New users receive free credits first, so you can test Nano Banana 2.1 before making payments.

What is the no-code workspace?

Our no-code workspace at piapi.ai/workspace/nano-banana?version=nano-banana-2.1 lets you test the model directly in your browser before integration.

Do you support webhooks?

Yes, webhook notifications are available for asynchronous workflows.

How do I integrate the Nano Banana API into my application?

Integration is straightforward with our REST API. Use the version-specific task_type, then poll until the completed response contains output.image_urls.

What kind of prompts work best?

Clear, descriptive prompts and well-chosen reference images usually produce the best results.

Is there a limit on image generation?

There are no hard total generation limits, but request-level constraints depend on the selected model configuration.

How can I get in touch with your team?

Please email us at support@piapi.ai and we would be happy to help.

More questions? See the API docs.

Our blog

Nano Banana 2.1 API