Use the Developer Center in PAI ArtLab to confirm that your ComfyUI service accepts API calls and returns generated images. PAI ArtLab offers two ComfyUI editions with different call models — choose based on your deployment scenario.
Choose an edition
| Edition | Interface | Multi-instance support | Call model |
|---|---|---|---|
| API edition | API only, no web UI | Yes | Asynchronous queue (EAS) |
| Exclusive edition | API + web UI | — | Synchronous HTTP |
Use the API edition when you need to scale across multiple ComfyUI instances. Use the Exclusive edition for single-instance deployments or interactive debugging.
API edition
The API edition has no web UI. Because ComfyUI is a stateful service, multi-instance deployments route requests through the Elastic Algorithm Service (EAS) asynchronous queue to ensure each request lands on the correct instance.
Prerequisites
Before you begin, ensure that you have:
A Python environment
The EAS SDK for the asynchronous queue service:
pip install eas_prediction
Create the service and get call information
Log on to the PAI ArtLab console. In the left-side navigation pane, choose Developer Center and click the Custom Service tab. Click Create Custom Service.
For Service Edition, select ComfyUI (API Edition).
When Status changes to Running, click Call Information. On the Response URL (Internet) tab, copy the URL, token, endpoint, and service ID.

Submit a workflow request
Replace the four parameters at the top of the following code with the values from the Call Information panel, then run the script.
Retrieve the output image
After the script completes, note the filename in the output. The
task_idtag matches the value you passed inapi_prompt?task_id=. Thedatafield contains the generated image filename.
In ArtLab, hover over
in the upper-right corner. Click the link next to Storage to open the OSS bucket and copy the storage path.
Construct the full image URL using the format
<OSS bucket path>/output/<filename>. Example:26****/data-115****************/output/ComfyUI_00000000_174427782695938_599ffc33-edea-4e64-bb60-28e834940f5c_.png
Exclusive edition
The Exclusive edition supports both API calls and web-based debugging. It uses a synchronous request model: submit a workflow to get a prompt_id, then query the history endpoint to retrieve the output.
Prerequisites
Before you begin, ensure that you have:
A Python environment
Create the service and get call information
Log on to the PAI ArtLab console. In the left-side navigation pane, choose Developer Center and click the Custom Service tab. Click Create Custom Service.
For Service Edition, select ComfyUI (Exclusive edition).
When Service Status changes to Running, click Call Information. On the Internet Endpoint tab, copy the URL and token.

Submit a workflow and retrieve the result
Replace the two parameters at the top of the following code with the values from the Call Information panel, then run the script. The script submits the workflow and prints the output filename.
Retrieve the output image
After the script completes, note the filename in the output. The history response groups images by node ID. Each entry in
outputs[node_id]["images"]contains afilenamefield with the saved image name.
In ArtLab, hover over
in the upper-right corner. Click the link next to Storage to open the OSS bucket and copy the storage path.
Construct the full image URL using the format
<OSS bucket path>/output/<filename>. Example:26****/data-115****************/output/ComfyUI_00000000_174427782695938_599ffc33-edea-4e64-bb60-28e834940f5c_.png