Uma chave, 366 modelos
A API agregadora mais flexível, acessível e transparente para 366 modelos de imagem, vídeo, áudio e 3D.
42,6% de todos os vídeos gerados na Comfy foram feitos via Seedance 2.5 no último mês, 4,4x mais que o segundo colocado.Ver classificação dos modelos
Google- OpenAI
- ByteDance
- Kling
- Black Forest Labs
- fal
- MiniMax
- ElevenLabs
- Wan
- Higgsfield
- Runway
- Luma
- Recraft
Ideogram
- Meshy
Tencent
Um esquema, todos os modelos
Alterne modelos mudando um ID. Modelos populares têm hosts de backup.
Números abertos
Classificações públicas e um custo em cada chamada.
99,9% de disponibilidade
Com vários provedores de failover.
Como nossos preços se comparam
Ver todos os preçosO Comfy Router tem 0% de acréscimo sobre o preço de tabela. Compare com fal e Runway ML.
| Modelo | Comfy Router | Criador do modelo | fal | Runway |
|---|---|---|---|---|
| Seedance 2.5720p | $0,231/segundo | $0,231/segundo | $0,473/segundo+105% | $0,30/segundo+30% |
| Seedance 2.0720p | $0,151/segundo | $0,151/segundo | $0,3034/segundo+101% | $0,30/segundo+99% |
| MiniMax H3768p | $0,08/segundo | $0,08/segundo | Não listado | $0,10/segundo+25% |
| Kling 3.01080p pro, with audio | $0,168/segundo | $0,168/segundo | $0,168/segundo | $0,17/segundo+1% |
| $0,0941/imagem | $0,1344/imagem | $0,15/imagem+59% | $0,20/imagem+113% | |
| Seedream 5.0 Pro1K | $0,045/imagem | $0,045/imagem | $0,0675/imagem+50% | $0,05/imagem+11% |
| ElevenLabs v3Text to speech | $0,08/1 mil caracteres | $0,08/1 mil caracteres | $0,10/1 mil caracteres+25% | $0,20/1 mil caracteres+150% |
Descreva o que você quer criar
Escreva uma ou duas frases sobre seu projeto. Nós as inserimos em um prompt inicial que instrui seu agente de programação sobre como criá-lo no Comfy Router; depois, você o copia ou o abre no seu agente.
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.Antes de colar
- Instale um agente de programação, como Claude Code, além do Node 22+ ou Python 3.10+.
- Crie uma chave de API do espaço de trabalho em platform.comfy.org e adicione créditos. O Router é cobrado conforme o uso, portanto você não precisa de uma assinatura do Cloud.
- Coloque a chave em um arquivo .env como COMFY_API_KEY. Nunca a cole no chat.
- Está com dificuldades? Os guias do Router estão em docs.comfy.org.
Todos os seus modelos de mídia generativa em um só lugar
Todos os modelos são executados no Comfy por padrão; você pode definir model_provider para executá-los em outro provedor. Estamos começando com os modelos de maior tráfego; mais modelos e provedores chegarão em breve.
| MODELO | Comfy | fal | Higgsfield | WaveSpeed | ||
|---|---|---|---|---|---|---|
| GPT Image 2↗ | Disponível | Disponível | Indisponível | Disponível | Disponível | Disponível |
| GPT Image 2.5 Flare↗ | Disponível | Disponível | Indisponível | Indisponível | Disponível | Disponível |
| GPT Image 2.5 Sunburst↗ | Disponível | Disponível | Indisponível | Indisponível | Disponível | Disponível |
| Kling 3.0 Turbo↗ | Disponível | Indisponível | Disponível | Indisponível | Indisponível | Indisponível |
| Kling V3↗ | Disponível | Indisponível | Disponível | Indisponível | Indisponível | Indisponível |
| Nano Banana 2↗ | Disponível | Disponível | Indisponível | Disponível | Disponível | Disponível |
| Nano Banana Pro↗ | Disponível | Disponível | Indisponível | Disponível | Disponível | Disponível |
| Seedance 2.0↗ | Disponível | Disponível | Disponível | Disponível | Disponível | Disponível |
| Seedance 2.5↗ | Disponível | Disponível | Disponível | Indisponível | Disponível | Disponível |
| Wan 3.0 Video↗ | Disponível | Indisponível | Disponível | Indisponível | Indisponível | Indisponível |