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.

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

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:
main_service_url is the ComfyUI URL. While current_status is Starting, poll again until it is Ready. A full example in Python:
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.
Activate Development Mode
Ensure that "Enable Development Mode Options" is activated in the Settings menu.

Download the workflow_api.json file by clicking on the Save (API Format) button.
The following file is AnimateDiff + ControlNet + Auto Mask | Restyle Video, which will be used as an example.
Upload Image as Input
Upload Video as Input
The response will be something like:
{
"name": "zzzz.mp4",
"subfolder": "",
"type": "input"
}The zzzz.mp4 is the file you uploaded via the API in the input folder. Sometimes it may contain suffixes like '(1)' or '(1)(1)' if a file with the same name already exists.
Queue prompt
Basic HTTP API:
- Generate client_id
import uuid
client_id = str(uuid.uuid4())- Load
workflow_api.jsonfrom your local disk and change the input to the file name which you just uploaded ininputfolder, and also modify the prompt text in the json if you need to.
import json
prompt_data = json.load(open("workflow_api.json"))
prompt_data['89']['inputs']['video'] = 'zzzz.mp4'- Call the queue prompt api
- check status
- Reference to https://github.com/comfyanonymous/ComfyUI/blob/master/script_examples/websockets_api_example.py for more details
import websocket
import uuid
ws = websocket.WebSocket()
ws.connect("ws://{}/ws?clientId={}".format('yyyyyyy-yyyy-yyyy-yyyyyyyyyyyy-comfyui.runcomfy.com', client_id))
while True:
out = ws.recv()
print(out)- Get Result
- Explanation on the url path
- If you want to get the file from the following path, /ComfyUI/output/subfolder1/subfolder2/test_00001_.png, try GET the following url, https://xxx-comfyui.runcomfy.com/api/view?filename=test_00001_.png&subfolder=subfolder1%2Fsubfolder2&type=output