Backend API

Hono-based backend server that proxies requests to ComfyUI instances and manages job status.

API Endpoints

POST /api/execute

Execute a workflow on a ComfyUI server.

Request Body:

{ "serverIp": "192.168.1.100", "workflow": { /* ComfyUI workflow JSON */ }, "clientId": "optional-client-id" }

Response:

{ "prompt_id": "uuid", "number": 123, "client_id": "client-id", "server_ip": "192.168.1.100" }

GET /api/status/:promptId?serverIp=ip

Get the status of a specific job.

Response:

{ "prompt_id": "uuid", "status": "completed", "images": ["filename1.png", "filename2.png"], "created_at": "2023-...", "completed_at": "2023-..." }

GET /api/history

Get execution history.

GET /api/images/:filename?serverIp=ip

Proxy images from ComfyUI server.

GET /api/server-info?serverIp=ip

Check if a ComfyUI server is online and get queue status.

Features

  • Job Tracking: Monitors job status across queue, running, and history states
  • Image Proxying: Serves generated images through the backend
  • Error Handling: Comprehensive error handling with detailed messages
  • History Management: Keeps track of recent executions
  • Server Health: Checks ComfyUI server availability