RunComfy offers two API approaches to suit various integration needs:

RunComfy Server API and ComfyUI Backend API These APIs lets you spin up and fully control a dedicated ComfyUI backend. Start by using the Server API to manage machines through simple calls: POST to generate a server_id, poll the status endpoint until it reaches "Ready", and then access the **ComfyUI Backend API** directly for tasks like executing workflows, managing nodes, and retrieving outputs. This approach is perfect when you need complete oversight of the ComfyUI backend, such as for in-depth integrations with creative software like Krita, Photoshop, Blender, iClone, or other tools.

RunComfy Serverless API This API turns any ComfyUI workflow into an on-demand, autoscaling endpoint, enabling simple API calls without any server setup or maintenance. It includes asynchronous job monitoring and versioning for rapid updates, making it ideal for efficient, scalable production setups that can be easily integrated into your apps. For more details, check our Serverless API documentation.

Get ComfyUI Backend URL

Note: Since November 4, 2026, each machine gets its own ComfyUI URL when it starts. The URL is not built from the server_id, so https://{server_id}-comfyui.runcomfy.com does not work. Get the URL in one of the two ways below, and get it again every time you start a machine.

Option 1: Copy it from the machine page

Open your running machine on the RunComfy website, then click URL in the right sidebar.

Click URL in the right sidebar of the machine page

Click URL in the right sidebar of the machine page

A panel opens with the ComfyUI URL of this machine. Click Copy.

The ComfyUI URL of this machine, with the Copy button

The ComfyUI URL of this machine, with the Copy button

Option 2: Read it from the RunComfy Server API

Use this when your own software starts machines or connects to them. You need your user_id, the server_id and an API token; see RunComfy Server API for where to find them. If you started the machine on the website, the machine page url is https://www.runcomfy.com/comfyui/{user_id}/servers/{server_id}.

curl 'https://api.runcomfy.net/prod/api/users/{user_id}/servers/{server_id}' \
  --header 'Authorization: Bearer {api_token}'

Example response once the machine is ready:

{
  "server_id": "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz",
  "estimated_duration": 3600,
  "server_type": "medium",
  "user_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "main_service_url": "https://09912622-dfe1-404b-a83a-0b0371dbd9b3-comfyui.runcomfy.com",
  "current_status": "Ready",
  "service_ready_at": "2026-11-09T13:49:15.925423Z",
  "estimated_stopping_at": "2026-11-09T14:49:15.925423Z"
}

main_service_url is the ComfyUI URL. While current_status is Starting, poll again until it is Ready. A full example in Python:

import time
import requests

USER_ID = "your-user-id"
SERVER_ID = "your-server-id"
API_TOKEN = "your-api-token"

while True:
    server = requests.get(
        f"https://api.runcomfy.net/prod/api/users/{USER_ID}/servers/{SERVER_ID}",
        headers={"Authorization": f"Bearer {API_TOKEN}"},
    ).json()
    if server["current_status"] == "Ready":
        break
    if server["current_status"] in ("Failed", "Canceled", "Deleting", "Deleted"):
        raise RuntimeError(f"machine is {server['current_status']}")
    time.sleep(10)

comfyui_url = server["main_service_url"]
print(requests.get(f"{comfyui_url}/system_stats").json())

In the examples below, replace https://yyyyyyy-yyyy-yyyy-yyyyyyyyyyyy-comfyui.runcomfy.com with your ComfyUI URL.

Note: Please use this ComfyUI URL in a trusted environment, DO NOT SHARE IT publicly.