上个月,Comfy 上生成的所有视频中有 43.0% 使用了 Seedance 2.5,是排名第二者的 4.2 倍。查看模型排名
Comfy Router
1 个密钥 · 1 张账单
Google- OpenAI
- ByteDance
- Kling
- Black Forest Labs
- fal
- MiniMax
- ElevenLabs
- Wan
- Higgsfield
- Runway
- Luma
- Recraft
Ideogram
- Meshy
Tencent
灵活
一个架构,适配所有模型
只需更改一个 ID 即可切换模型。热门模型配有备用托管服务。
透明
公开数据
公开排名,每次调用均标明成本。
可靠
99.9% 正常运行时间
配备多个故障转移服务提供商。
我们的价格对比
查看所有价格Comfy Router 按标价收取 0% 加价。可与 fal 和 Runway ML 对比。
| 模型 | Comfy Router | 模型制作者 | fal | Runway |
|---|---|---|---|---|
| Seedance 2.5720p | $0.231/秒 | $0.231/秒 | $0.473/秒+105% | $0.30/秒+30% |
| Seedance 2.0720p | $0.151/秒 | $0.151/秒 | $0.3034/秒+101% | $0.30/秒+99% |
| MiniMax H3768p | $0.08/秒 | $0.08/秒 | 未列出 | $0.10/秒+25% |
| Kling 3.01080p pro, with audio | $0.168/秒 | $0.168/秒 | $0.168/秒 | $0.17/秒+1% |
| $0.134/图像 | $0.134/图像 | $0.15/图像+12% | $0.20/图像+49% | |
| $0.067/图像 | $0.067/图像 | $0.08/图像+19% | $0.04/图像 | |
| Seedream 5.0 Pro1K | $0.045/图像 | $0.045/图像 | $0.0675/图像+50% | $0.05/图像+11% |
| ElevenLabs v3Text to speech | $0.08/1K 个字符 | $0.08/1K 个字符 | $0.10/1K 个字符+25% | $0.20/1K 个字符+150% |
入门提示词
描述你想要构建的内容
用一两句话介绍你的项目。我们会将其填入一段入门提示词,告诉你的编码智能体如何在 Comfy Router 上构建它,然后你可以复制该提示词或在智能体中打开它。
Read these pages before you write any code:
https://docs.comfy.org/development/comfy-router/quickstart
https://docs.comfy.org/development/comfy-router/queue
https://docs.comfy.org/development/api-development/sdks
https://docs.comfy.org/development/comfy-router/models
https://github.com/Comfy-Org/comfy-skills/blob/main/claude-code-sdk/skills/comfy-sdk/SKILL.md
I want to build [describe your project in a sentence or two].
If this project already calls another generation API, keep its structure and swap those calls to Comfy Router: same request flow, new base URL, key and model IDs.
Build it locally with the Comfy SDK, 0.4.0 or later: Python (comfy-sdk) or TypeScript (@comfyorg/sdk). Do all generation through Comfy Router. The SDK docs also cover the Comfy Cloud workflow client; do not set that up, this project does not need it.
Setup:
- My API key is COMFY_API_KEY in a .env file in this folder. Create .env.example with COMFY_API_KEY= and add .env to .gitignore. If .env or the key is missing, tell me the exact path to put it at and keep building and testing everything that does not need live generation; wait for the key before any live API call. Never ask me to paste the key into chat.
- .env wins over my shell: load_dotenv(override=True) in Python, dotenv.config({ override: true }) in Node. Do not use node --env-file, it does not override. Keep the key on the server, never in browser JS.
SDK:
- TypeScript: import { comfy } from "@comfyorg/sdk" and use lowercase comfy.models. new Comfy(...) is the Cloud workflow client and has no .models.
- Python: use Comfy().models, or AsyncComfy().models in async code.
- Router is at https://api.comfy.org. On plain HTTP instead of the SDK: send the key as X-API-Key, POST the model's native JSON body to /v2/models/{provider}/{model} (or /v2/models/{provider}/{model}/requests to queue), and send a new Idempotency-Key UUID per generation, reusing it on retries. The SDKs do all of this for you.
- GET /v2/models lists the models this key can call. Use it as a preflight: a 401 there means the key is wrong, not the model.
- Pass input images, video and audio as public https URLs. A small image can be a data: base64 URL, but the request body is capped, so don't inline large media.
- If I have not named a model, pick one from the models page and use the provider/model ID from its table. Either way, read that model's page, or GET /v2/models/{provider}/{model}/openapi.json, for its input and output fields before writing the request.
Long-running generation:
- Router cuts a synchronous run off at 10 minutes. In Python pass timeout=660 to each models.run(...) call; Comfy(timeout=...) does not change models.run's own default. In TypeScript, run takes timeoutMs in milliseconds and its default already covers long runs, so leave it.
- If generation can outlive a web request, use models.submit(), store the model ID and request ID, and poll status() and get(), or rebuild the handle later with models.handle(model, request_id) in Python or models.handle(model, requestId) in TypeScript. A finished result is kept for 24 hours, so download any asset URLs promptly. models.subscribe() submits, polls and collects in one call, but it still waits in the calling process. Neither mode has webhooks.
- Show queued, running and finished states. Do not invent a percentage. A finished request can still carry an error_type, so surface it.
- A 402 insufficient_credits means the workspace needs credits. Tell me that instead of retrying.
When it is ready, start the app locally and walk me through one pass: generate, display the result, download it.粘贴前准备
- 安装 Claude Code 等编码智能体,并安装 Node 22+ 或 Python 3.10+。
- 在 platform.comfy.org 创建工作区 API 密钥并充值。Router 按用量付费,因此你无需订阅 Cloud。
- 将密钥以 COMFY_API_KEY 的形式写入 .env 文件。切勿将其粘贴到聊天中。
- 遇到问题?Router 指南位于 docs.comfy.org。