server-api
БесплатноБез исполняемых скриптовНе проверенLaunch ComfyUI safely and automate it through HTTP and websocket APIs, including queueing prompt JSON, monitoring progress, collecting outputs, configuring…
от lza6★ 19 звёзд на GitHubОб этом скилле
ComfyUI Server and API
Use this sub-skill when an agent needs to start ComfyUI, configure server-facing CLI flags, call REST endpoints, queue an API workflow, monitor websocket progress, download output images, or troubleshoot server/API access.
Route graph construction, node input semantics, validation failures, and API-workflow JSON structure to ../workflow-execution/. Route model folders, extra_model_paths.yaml, backend/VRAM choices, and checkpoint placement to ../models-config/. Route custom node class authoring and node metadata implementation to ../custom-nodes/.
Fast Path
- Start ComfyUI with explicit network/security choices:
- Local-only default:
python main.py --listen 127.0.0.1 --port 8188 - LAN/API host: add a specific
--listenaddress and review CORS/TLS before exposing it. - Multi-user storage: add
--multi-userand use user-scoped endpoints carefully.
- Local-only default:
- Export the graph from the UI with
File -> Export (API); do not POST the normal UI workflow JSON unless it has been converted to API prompt JSON. - Validate the JSON shape before sending it: root object maps node ids to objects with
class_typeandinputs. - Queue with
POST /promptusing{ "prompt": { ... }, "client_id": "..." }. Let the server mintprompt_id, or provide a canonical lowercase hyphenated UUID. - Monitor progress with
GET /ws?clientId=<client_id>and wait for a text message of typeexecutingwhosedata.prompt_idmatches and whosedata.nodeisnull. - Fetch outputs with
GET /history/{prompt_id}, then download files throughGET /view?filename=...&subfolder=...&type=output.
Bundled Helpers
scripts/comfy_api_client.pyvalidates an exported API workflow, queues it through/prompt, optionally waits for/history/{prompt_id}, and downloads output media through/view.scripts/comfy_websocket_monitor.pyqueues an API workflow, monitors/ws, ignores binary preview frames by default, waits for the targetprompt_id, and can download final output files.
Both scripts use only Python standard-library modules by default. Run python <script> --help for arguments. They never embed model paths or credentials; pass secrets through environment variables only when needed.
Common Endpoint Flow
POST /prompt
body: {"prompt": <api-workflow>, "client_id": "<uuid-or-client-string>"}
response: {"prompt_id": "<uuid>", "number": <queue-number>, "node_errors": {...}}
GET /history/<prompt_id>
response: {"<prompt_id>": {"outputs": {"<node_id>": {"images": [...]}}}}
GET /view?filename=<name>&subfolder=<subfolder>&type=output
response: file bytes
For API nodes that call Comfy’s hosted API, put the key in request extra_data, never in the workflow JSON or script source:
{
"prompt": {"...": "..."},
"client_id": "automation-client",
"extra_data": {"api_key_comfy_org": "${COMFY_API_KEY}"}
}
api_key_comfy_org is sensitive queue metadata; avoid logging it and do not store it in reusable examples.
References
references/cli-reference.mdcovers launch flags for listen/port, TLS, CORS, user directories, frontend, manager/API-node controls, assets, compression, logging, and backend caveats.references/api-reference.mdsummarizes core REST routes, payloads, job endpoints, app/user/model/assets surfaces, and/apiprefix behavior.references/api-workflows.mdexplains queue/history/view automation, websocket message semantics, binary previews, and bundled script usage.references/troubleshooting.mdmaps common failures to checks and fixes.
Safety Defaults
- Keep
--listen 127.0.0.1unless a remote client genuinely needs access. - Prefer TLS termination by a trusted local reverse proxy; if using ComfyUI TLS flags, provide both
--tls-keyfileand--tls-certfile. - Do not use
--enable-cors-header *on a host reachable by untrusted browsers unless that is an intentional integration choice. - Use
--disable-api-nodeswhen external hosted-provider API nodes and frontend internet communication should be blocked. - Use
--disable-all-custom-nodesor--whitelist-custom-nodeswhile diagnosing untrusted or broken custom-node startup code. - Treat
/internal/*as frontend/internal only; do not build stable automations on it.
Установить server-api в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл server-api?
Launch ComfyUI safely and automate it through HTTP and websocket APIs, including queueing prompt JSON, monitoring progress, collecting outputs, configuring server flags, and handling user/model/asset route surfaces.
Как установить скилл server-api?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл server-api запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic