我们的定价方案
Pay per image, no subscription required
Flux-Schnell API
$0.0015 /张图片
- 1–4 images per generation
- Super-resolution: $0.0015/image
Flux-dev API
$0.015 /张图片
- Super-resolution: $0.015/image
Flux-dev-advanced
$0.02 /张图片
- LoRA · ControlNet · inpaint / outpaint · redux-variation · Kontext
- Needs Creator or higher subscription plan
功能特性
图生图功能!
PiAPI 将率先为 FLUX API 提供图生图功能,让开发者和用户在生成各类视觉内容时拥有更大的灵活性。
支持 Seed 参数
Num_outputs 是一个实用参数,可用于控制生成输出的数量。若不指定,API 默认生成 1 张图像。
支持 Aspect_ratio 参数
开发者可使用此参数调整输出图像的画面比例,使生成结果更适用于各种不同的使用场景!
异步 API 调用
API 采用异步调用设计,允许开发者「提交后不等待」,待任务完成后再获取结果。
加速硬件基础设施
我们专为潜在扩散模型推理工作优化的加速硬件基础设施,确保任务以最高效率和最低延迟执行。
自定义推理框架
我们面向潜在扩散模型工作负载开发的自定义推理框架,专注于优化运行时性能和资源管理,避免传统框架的瓶颈问题。
支持批量生成
完美适合需要大量自定义图片的开发者,可批量为网站、应用或项目填充内容。请在 Discord 上联系我们并提供你的提示词,我们将尽快给出报价和时间安排!
简单灵活的付费方案
我们的按需付费选项让开发者可以用免费额度试用 API,购买额度后按消耗计费,并可根据使用量手动或自动充值。
商业用途
基于 FLUX.1-schnell 模型的 Apache 2.0 许可证,通过我们的 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.
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "Qubico/flux1-schnell",
"task_type": "txt2img",
"input": {
"prompt": "A cat sitting on a windowsill watching rain fall outside, soft lighting, cozy and peaceful mood.",
"width": 1024,
"height": 1024
}
}'
# → { "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 flux-api \ prompt="A cat sitting on a windowsill watching rain fall outside, soft lighting, cozy and peaceful mood." \ width=1024 \ height=1024 ✓ Task completed! https://img.theapi.app/ephemeral/…
常见问题
什么是 FLUX API?
FLUX API 由 PiAPI 基于 FLUX.1-dev 模型和 FLUX.1-schnell 模型提供。凭借我们的加速硬件基础设施和自研推理框架,PiAPI 能够以极具市场竞争力的价格提供这两款模型的 API 服务,同时保持高性能和低延迟!
使用 FLUX.1 API 可以生成哪些类型的图像?
FLUX-dev 和 FLUX-schnell 模型的最新 ELO 评分均超过了 Midjourney,图像生成的可能性几乎无限。预计其影响将遍及娱乐、教育、产品设计乃至科学可视化等众多行业。
FLUX-dev API 生成的图像可以用于商业用途吗?
基于 FLUX.1-schnell 模型的 Apache 2.0 许可证,使用该模型通过我们的 API 生成的所有图像均可供开发者或最终用户用于商业用途。但由于 BFL 限制 FLUX.1-dev 模型仅供非商业使用,通过 API 使用该模型生成的图像不可用于商业目的。
支持退款吗?
不,我们不提供退款。但当您首次在 PiAPI 的 Workspace 注册账户时,将获得免费积分,可以在付款前试用我们的 API!
如何联系你们的团队?
请发邮件至 support@piapi.ai,我们很乐意进一步介绍我们的产品!
More questions? See the API docs.
Our blog
Flux API



