
Comfyui Api
- 1.5k installs
- 85 repo stars
- Updated March 18, 2026
- mckruz/comfyui-expert
comfyui-api is an agent skill that connect to a running comfyui instance, queue workflows, monitor execution, and retrieve results. supports both online (rest api) and offline (json export) modes. use when executing comf
About
comfyui-api is an agent skill from mckruz/comfyui-expert that connect to a running comfyui instance, queue workflows, monitor execution, and retrieve results. supports both online (rest api) and offline (json export) modes. use when executing comfyui workflows o. # ComfyUI API Skill Connect to ComfyUI's REST API to execute workflows, monitor progress, and retrieve outputs. ## Configuration - **Default URL**: `http://127.0.0.1:8188` - **Custom URL**: Set in project manifest or pass as parameter - **Timeout**: 30s for API calls, no timeout for generation polling ## Two Modes ### Online Mode (ComfyUI Runn Developers invoke comfyui-api during build/integrations work for generative media tasks. The skill documents triggers, prerequisites, and step-by-step workflows grounded in SKILL.md. Compatible with Claude Code, Cursor, and Codex agent runtimes that load marketplace skills.
- Connect to ComfyUI's REST API to execute workflows, monitor progress, and retrieve outputs.
- Default URL**: `http://127.0.0.1:8188`
- Custom URL**: Set in project manifest or pass as parameter
- Timeout**: 30s for API calls, no timeout for generation polling
- Online Mode (ComfyUI Running)
Comfyui Api by the numbers
- 1,504 all-time installs (skills.sh)
- +47 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #193 of 1,335 Generative Media skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
comfyui-api capabilities & compatibility
- Capabilities
- connect to comfyui's rest api to execute workflo · default url**: `http://127.0.0.1:8188` · custom url**: set in project manifest or pass as · timeout**: 30s for api calls, no timeout for gen · online mode (comfyui running)
- Use cases
- orchestration
What comfyui-api says it does
Connect to ComfyUI's REST API to execute workflows, monitor progress, and retrieve outputs.
- **Default URL**: `http://127.0.0.1:8188`
- **Custom URL**: Set in project manifest or pass as parameter
npx skills add https://github.com/mckruz/comfyui-expert --skill comfyui-apiAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.5k |
|---|---|
| repo stars | ★ 85 |
| Security audit | 3 / 3 scanners passed |
| Last updated | March 18, 2026 |
| Repository | mckruz/comfyui-expert ↗ |
What it does
Connect to a running ComfyUI instance, queue workflows, monitor execution, and retrieve results. Supports both online (REST API) and offline (JSON export) modes. Use when executing ComfyUI workflows o
Who is it for?
Developers working on generative media during build tasks.
Skip if: Tasks outside Generative Media scope described in SKILL.md.
When should I use this skill?
Connect to a running ComfyUI instance, queue workflows, monitor execution, and retrieve results. Supports both online (REST API) and offline (JSON export) modes. Use when executing ComfyUI workflows o
What you get
Completed generative media workflow aligned with SKILL.md steps.
- Queued workflow executions
- Generated media output files
By the numbers
- Default ComfyUI REST endpoint http://127.0.0.1:8188
- API calls use a 30-second timeout
Files
ComfyUI API Skill
Connect to ComfyUI's REST API to execute workflows, monitor progress, and retrieve outputs.
Configuration
- Default URL:
http://127.0.0.1:8188 - Custom URL: Set in project manifest or pass as parameter
- Timeout: 30s for API calls, no timeout for generation polling
Two Modes
Online Mode (ComfyUI Running)
Full API access. Preferred mode for interactive work.
1. Test connection: GET /system_stats 2. Discover capabilities: Use comfyui-inventory skill 3. Queue workflow: POST /prompt 4. Poll for results: GET /history/{prompt_id} every 5 seconds 5. Retrieve outputs: GET /view?filename=...
Offline Mode (No Server)
Export workflow JSON for manual loading in ComfyUI.
1. Generate workflow JSON following ComfyUI's format 2. Save to projects/{project}/workflows/{name}.json 3. Instruct user to drag-drop into ComfyUI
API Operations
Check Server Status
curl http://127.0.0.1:8188/system_statsResponse fields:
system.os: Operating systemsystem.comfyui_version: Version stringdevices[0].name: GPU namedevices[0].vram_total: Total VRAM bytesdevices[0].vram_free: Free VRAM bytes
Queue a Workflow
curl -X POST http://127.0.0.1:8188/prompt \
-H "Content-Type: application/json" \
-d '{"prompt": WORKFLOW_JSON, "client_id": "video-agent"}'WORKFLOW_JSON format:
{
"1": {
"class_type": "LoadCheckpoint",
"inputs": {
"ckpt_name": "flux1-dev.safetensors"
}
},
"2": {
"class_type": "CLIPTextEncode",
"inputs": {
"text": "photorealistic portrait...",
"clip": ["1", 1]
}
}
}Each node is keyed by a string ID. Inputs reference other nodes as ["{node_id}", {output_index}].
Response:
{"prompt_id": "abc-123-def", "number": 1}Poll for Completion
curl http://127.0.0.1:8188/history/abc-123-defIncomplete: Returns {} (empty object) Complete: Returns execution data with outputs:
{
"abc-123-def": {
"outputs": {
"9": {
"images": [{"filename": "ComfyUI_00001.png", "subfolder": "", "type": "output"}]
}
},
"status": {"completed": true}
}
}Retrieve Output Image
curl "http://127.0.0.1:8188/view?filename=ComfyUI_00001.png&subfolder=&type=output" -o output.pngUpload Reference Image
curl -X POST http://127.0.0.1:8188/upload/image \
-F "image=@reference.png" \
-F "subfolder=input" \
-F "type=input"Cancel Current Generation
curl -X POST http://127.0.0.1:8188/interruptFree VRAM
curl -X POST http://127.0.0.1:8188/free \
-H "Content-Type: application/json" \
-d '{"unload_models": true}'Polling Strategy
ComfyUI doesn't support WebSocket in CLI context. Use REST polling:
1. Queue workflow via POST /prompt → get prompt_id 2. Poll GET /history/{prompt_id} every 5 seconds 3. On empty response: generation in progress, continue polling 4. On populated response: check status.completed 5. If completed: true, extract outputs 6. If error in status, route to comfyui-troubleshooter
Timeout: Warn user after 10 minutes of polling. Video generation (Wan 14B) can take 15-30 minutes.
Workflow Validation
Before queuing any workflow:
1. Read state/inventory.json (via comfyui-inventory) 2. For each node in workflow: verify class_type exists in installed nodes 3. For each model reference: verify file exists in installed models 4. Flag missing items with:
- Node: suggest
ComfyUI-Managerinstall command - Model: provide download link from
references/models.md - Version mismatch: suggest update
Error Handling
| Error | Cause | Action |
|---|---|---|
| Connection refused | ComfyUI not running | Switch to offline mode, save JSON |
| 400 Bad Request | Invalid workflow JSON | Validate node connections |
| 500 Internal Error | ComfyUI crash | Suggest restart, check logs |
| Timeout (no response) | Server overloaded | Wait and retry once |
Reference
Full API documentation: foundation/api-quick-ref.md
Related skills
How it compares
Pick comfyui-api when you own a ComfyUI node-graph server; pick hosted image API skills when you want managed endpoints without running ComfyUI locally.
FAQ
What does comfyui-api do?
Connect to a running ComfyUI instance, queue workflows, monitor execution, and retrieve results. Supports both online (REST API) and offline (JSON export) modes. Use when executing ComfyUI workflows o
When should I use comfyui-api?
During build integrations work for generative media.
Is comfyui-api safe to install?
Review the Security Audits panel on this listing before production use.