Loading...
Loading...
Run any model on RunComfy from the command line. The `runcomfy` CLI is one binary, one auth, hundreds of model endpoints — image generation, image edit, video generation, image-to-video, lip-sync, face swap, video edit, inpainting, outpainting, extend, ControlNet, relight, upscale, LoRA training and more. Submit a request, poll for status, download the output. This skill teaches the agent how to install, authenticate, discover model schemas, invoke models, stream / poll / no-wait, script in JSON output mode, and handle errors. Triggers on "runcomfy cli", "install runcomfy", "runcomfy login", "runcomfy run", "runcomfy whoami", "runcomfy api", or any explicit ask to call a RunComfy model from a script or terminal. Sibling skills (ai-image-generation, ai-video-generation, image-edit, video-edit, face-swap, lipsync, image-to-video, image-inpainting, image-outpainting, video-extend, controlnet-pose, relight) all dispatch through this CLI.
npx skill4agent add agentspace-so/runcomfy-agent-skills runcomfy-cliruncomfy run <model_id> --input '{...}'runcomfy-*npx skills add agentspace-so/runcomfy-agent-skills --skill runcomfy-cli -g# Global install via npm (recommended for repeat use)
npm i -g @runcomfy/cli
# Zero-install one-shot (no Node global state)
npx -y @runcomfy/cli --versionBash(runcomfy *)runcomfy --versionruncomfy login
# Code shown in terminal — paste into the browser page, click Authorize
# Token saved to ~/.config/runcomfy/token.json with mode 0600export RUNCOMFY_TOKEN=<token-from-runcomfy.com/profile>runcomfy whoami
# 📛 you@example.com
# token type: cli
# user id: ...runcomfy run <vendor>/<model>/<endpoint> \
--input '<JSON body>' \
--output-dir <path>runcomfy run openai/gpt-image-2/text-to-image \
--input '{"prompt": "a small purple cat at sunset, photorealistic"}'⏳ Submitting request to openai/gpt-image-2/text-to-image
request_id: 8a3f...
⏳ Polling status (every 2s)...
in_queue
in_progress
completed
✅ completed
{
"images": [
"https://playgrounds-storage-public.runcomfy.net/.../result.png"
]
}
📥 Downloading 1 file(s) to .
./result.png--output-dir ./out--no-downloadAPIopen https://www.runcomfy.com/models| URL | What |
|---|---|
| All featured models |
| The full catalog |
| Fresh additions |
| Curated brand collections |
| Lip-sync capability |
| Character / face swap |
| Video upscalers |
runcomfy run <model_id>| Flag | What |
|---|---|
| Inline JSON body. Strings can contain newlines; quote-escape as needed |
| Read body from a file (JSON or YAML by extension) |
| Where to download result files (default: cwd) |
| Skip the download step; only print the result JSON |
| Submit and return |
| Cap the polling wait. Default: model-dependent |
| Print machine-readable JSON for piping (default human-readable) |
| Suppress progress, keep only the final result line |
runcomfy loginruncomfy whoamiruncomfy logoutloginwhoamilogoutRUNCOMFY_TOKENruncomfy status <request_id>--no-waitRID=$(runcomfy --output json run google/nano-banana-2/text-to-image \
--input '{"prompt": "..."}' --no-wait | jq -r .request_id)
runcomfy status "$RID"runcomfy --output json run openai/gpt-image-2/text-to-image \
--input '{"prompt": "X"}' \
--no-download \
| jq -r '.images[0]'while IFS= read -r prompt; do
runcomfy run blackforestlabs/flux-2-klein/9b/text-to-image \
--input "$(jq -nc --arg p "$prompt" '{prompt:$p, steps:8}')" \
--output-dir "./out/$(date +%s%N)"
done < prompts.txt# Submit one or many jobs without blocking
RID=$(runcomfy --output json run bytedance/seedance-v2/pro \
--input '{"prompt": "..."}' --no-wait | jq -r .request_id)
# Later — possibly from a different shell:
runcomfy status "$RID"for i in 1 2 3; do
runcomfy run <model_id> --input '{...}' && break
rc=$?
[ $rc -eq 75 ] && sleep $((2**i)) && continue
exit $rc
done| code | meaning | retry? |
|---|---|---|
| 0 | success | — |
| 64 | bad CLI args | no |
| 65 | bad input JSON / schema mismatch | no |
| 69 | upstream 5xx | yes (after backoff) |
| 75 | retryable: timeout / 429 | yes |
| 77 | not signed in or token rejected | no — re-auth |
| 130 | interrupted (Ctrl-C); remote request is cancelled before exit | — |
runmodel-api.runcomfy.netcompletedfailedcanceled*.runcomfy.net*.runcomfy.com--output-dirCtrl-CDELETEnpm i -g @runcomfy/clinpx -y @runcomfy/cliruncomfy login~/.config/runcomfy/token.jsonRUNCOMFY_TOKEN--input$(...)enable_web_searchenable_web_searchfalsetruemodel-api.runcomfy.net*.runcomfy.net*.runcomfy.comallowed-tools: Bash(runcomfy *)runcomfy <subcommand>npmcurlexport RUNCOMFY_TOKEN=...ai-image-generationai-video-generationai-avatar-videoimage-editvideo-editimage-to-videoface-swaplipsyncimage-inpaintingimage-outpaintingvideo-extendcontrolnet-poserelight