简单透明的定价
按使用量付费,无订阅费,无隐藏成本。使用 Google 的 Gemini 2.5 Flash 以极具竞争力的价格生成高质量图像。
Nano Banana 2 API
$0.06-$0.12/img 每张
Developer-ready API access
为什么选择 Gemini 2.5 Flash Image API?
体验 Google 先进 Gemini 技术带来的新一代 AI 图像生成,兼顾速度、质量与性价比。
闪电般快速生成
基于 Google 优化后的 Gemini 2.5 Flash 模型,数秒内即可生成高质量图像,适合实时应用与快速原型。
高性价比定价
每张仅 $0.03,即可获得高质量 AI 图像;单次请求最多支持 4 张图,适合批量场景。
先进 AI 技术
利用 Google 前沿的 Gemini 2.5 Flash 模型,获得更强的图像生成能力和更出色的提示词理解。
多种输出格式
支持 JPEG 与 PNG 格式,可根据你的场景灵活选择。
免代码工作台
在接入应用前,可先通过直观的网页界面直接测试与生成图像。
开发者友好 API
提供清晰易用的 REST API、完善文档以及实用示例,方便接入各种语言与平台。
稳定基础设施
基于可靠的云基础设施,支持自动扩缩容,满足生产环境需求。
支持 Webhook
图像生成完成后可实时通知,适合异步工作流与自动化系统。
支持商业使用
生成图像可放心用于产品、营销活动和商业应用。
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.
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",
"input": {
"prompt": "A modern smartphone on a reflective surface with water droplets.",
"resolution": "1K"
}
}'
# → { "task_id": "9d5a…", "status": "pending" }curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'
# poll until status = completed
{
"data": {
"status": "completed",
"output": {
"image_url": "https://img.theapi.app/ephemeral/…"
}
}
}$ npm install -g piapi-cli $ piapi run nano-banana-2 \ prompt="A modern smartphone on a reflective surface with water droplets." \ resolution=1K ✓ Task completed! https://img.theapi.app/ephemeral/…
常见问题
什么是 Gemini 2.5 Flash Image API?
Gemini 2.5 Flash 是 Google 最新的 AI 图像生成模型,针对速度与质量进行了优化。我们的 API 让你可以在几秒内通过文本提示生成高质量图像。
生成图像的价格是多少?
定价非常简单透明:每张图 $0.03,单次请求最多可生成 4 张图,无订阅费,也无隐藏费用。
支持哪些图像格式?
支持 JPEG 与 PNG 输出格式,你可以在 API 请求中指定所需格式。
图像生成速度有多快?
大多数图像可在 10 秒内生成,非常适合实时应用、交互式工具和面向用户的产品。
生成的图像可以商用吗?
可以。通过我们的 Gemini 2.5 Flash API 生成的所有图像都可用于产品、营销材料、网站和其他商业应用。
什么是免代码工作台?
我们的免代码工作台 piapi.ai/workspace/nano-banana 可让你在无需编写代码的情况下测试 API。你可以直接在浏览器中输入提示词、调整参数并生成图像。
支持 Webhook 吗?
支持。你可以在请求中指定 Webhook 地址,在图像准备完成后收到通知。
如何将 API 集成到我的应用中?
通过我们的 REST API 即可轻松集成。详细请求说明和代码示例请查看 我们的 API 文档。
什么样的提示词效果更好?
更详细、更具描述性的提示词通常效果更好。建议包含风格、构图、光线、颜色和氛围等信息。
图像生成数量有限制吗?
总生成数量没有硬性上限,但当前单次 API 请求最多支持 4 张图像。
如何联系你们的团队?
请发送邮件至 support@piapi.ai,我们很乐意为你提供帮助。
More questions? See the API docs.
Our blog
Nano Banana 2 API



