Get the FREE Ultimate OpenClaw Setup Guide →
X

Comfyui anfrage

Scanned

@Xtopher86

npx machina-cli add skill @Xtopher86/comfyui-request --openclaw
Files (1)
SKILL.md
1.1 KB

comfyui-request

Purpose

Send a workflow request to a running ComfyUI instance and return the generated image URL or base64 data.

Configuration

  • COMFYUI_HOST: Host/IP of the ComfyUI server (default 192.168.179.111).
  • COMFYUI_PORT: Port of the ComfyUI server (default 28188).
  • COMFYUI_USER: Optional username for basic auth.
  • COMFYUI_PASS: Optional password for basic auth.

These can be set via environment variables or a .env file in the skill directory.

Usage

{
  "action": "run",
  "workflow": { ... }   // JSON workflow object
}

The skill will POST to http://{host}:{port}/run and return the response JSON.

Example

{
  "action": "run",
  "workflow": {
    "nodes": [ ... ],
    "edges": [ ... ]
  }
}

Notes

The skill expects the ComfyUI server to expose the /run endpoint and return a JSON object containing an image field with a URL or base64 string.

Source

git clone https://clawhub.ai/Xtopher86/comfyui-requestView on GitHub

Overview

Send a workflow to a running ComfyUI instance via POST /run and receive the generated image URL or base64 data. Configure host, port, and optional basic auth through environment variables or a .env file.

How This Skill Works

The skill POSTs to http://{host}:{port}/run with a JSON body containing action and the workflow. It returns a JSON response that includes an image field with a URL or base64 string for immediate use.

When to Use It

  • Automate image generation from a predefined ComfyUI workflow in a local AI pipeline.
  • Generate product or asset images on demand from a web app or bot.
  • In CI or automation scripts to render assets as part of a build.
  • Reuse workflows by swapping nodes/edges to create variations.
  • Integrate with other services by retrieving image URLs or base64 data to display or store.

Quick Start

  1. Step 1: Configure COMFYUI_HOST, COMFYUI_PORT and optional COMFYUI_USER/COMFYUI_PASS in a .env or environment.
  2. Step 2: Create a valid workflow JSON and call the skill with action: run and the workflow.
  3. Step 3: Parse response.image (URL or base64) and render or save it.

Best Practices

  • Validate the workflow JSON before sending to avoid server errors.
  • Keep COMFYUI_HOST/PORT reachable and secure; use .env for credentials.
  • Prefer using the image URL when possible to minimize payload size.
  • Handle both URL and base64 image outputs in your UI.
  • Set timeouts and robust error handling for failed runs.

Example Use Cases

  • Basic run: trigger a workflow and display response.image as a preview in a dashboard.
  • Authenticated run: access a private ComfyUI server using COMFYUI_USER and COMFYUI_PASS.
  • Frontend integration: a button posts a workflow and renders the returned image URL.
  • CI asset generation: script generates images during build and saves the image URL.
  • Workflow variation: reuse the same logic with different workflow nodes/edges to create variants.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers