comfy-sdk
Installation
SKILL.md
comfy-sdk — build with Comfy Router
Steering only. Model names, schemas, prices and default timeouts change: discover them at run time (section 3) or read them off the installed SDK, and never paste one from memory.
1. Pick the right client
- Router (partner models,
https://api.comfy.org) is reached through themodelsnamespace:- Python:
Comfy().models(AsyncComfy().modelsfor asyncio). - TypeScript: the module-level
comfy.models, aftercomfy.config({ credentials })or withCOMFY_API_KEYset.new Comfy({ apiKey })is the Comfy Cloud workflow client and has no.models.
- Python:
- Cloud (
/api/v2/jobs, run a ComfyUI workflow) is the class client in both SDKs. - Both use the same
COMFY_API_KEY. Hosts are separate:COMFY_ROUTER_BASE_URLredirects Router,COMFY_BASE_URLredirects Cloud. Leave both unset in production.