Nano Banana 2.1 · 1K
$0.03 每张图
- Text-to-image and image editing
Nano Banana 2.1 API|图像生成与编辑 / — 图像生成与编辑
通过 PiAPI 使用 Google Gemini Nano Banana 2.1,支持文生图与参考图编辑,并可选择 1K、2K、4K 输出。
按分辨率选择 Nano Banana 2.1 档位:1K、2K 或 4K。
$0.03 每张图
$0.04 每张图
$0.09 每张图
使用同一份 PiAPI 请求契约完成生成、编辑与历史记录。
Nano Banana 2.1 produces output at lightning-fast speed, making it a strong fit for rapid creative and production workflows.
Nano Banana 2.1 grounds generations in current information to create more accurate diagrams, layouts, and data-driven visuals.
Nano Banana 2.1 performs strongly on text rendering and multilingual use cases, helping teams create cleaner visual assets with embedded text.
Generate production-ready outputs with flexible aspect ratios, multiple formats, and resolutions up to 4K.
Support for character and object references helps preserve consistency across complex scenes.
Nano Banana 2.1 follows creative instructions closely, giving teams more control over image generation and editing tasks.
Expect richer textures, stronger lighting, and sharper details across outputs, from quick previews to polished assets.
Nano Banana 2.1 delivers high-fidelity image generation and image editing for production workflows.
Use the PiAPI Playground to test Nano Banana 2.1, then ship the same request shape through the unified API.
Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.
Add credits on the billing page when you are ready to scale beyond the free tier.
POST your first task following the API docs, then poll the task until the result is ready.
Prototype prompts and settings in the the playground above before wiring them into your product.
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"
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'image_urls / image_url
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",
"image_urls": [
"YOUR_IMAGE_URL"
]
}
}'curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'image_urls / image_url
支持 1K、2K 和 4K,并可选择 API 支持的宽高比与 PNG 或 JPG 输出。
可以。上传 image_urls 并提供提示词即可使用图生图编辑;文生图只需要提示词。
请求中使用 model=gemini 与 task_type=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.
No, we do not offer refunds. New users receive free credits first, so you can test Nano Banana 2.1 before making payments.
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.
Yes, webhook notifications are available for asynchronous workflows.
Integration is straightforward with our REST API. Use the version-specific task_type, then poll until the completed response contains output.image_urls.
Clear, descriptive prompts and well-chosen reference images usually produce the best results.
There are no hard total generation limits, but request-level constraints depend on the selected model configuration.
Please email us at support@piapi.ai and we would be happy to help.
More questions? See the API docs.
Nano Banana 2.1 API