Get your ComfyUI workflow deployed as a serverless API and make your first inference call. This guide walks you step-by-step through deploying a pre-built community workflow, RunComfy/FLUX, into a scalable, ready-to-use API endpoint.
Note: You can deploy your own custom workflows as APIs too, check out the Custom Workflows section for details.

Step 1: Prepare the Workflow

First, visit the RunComfy/FLUX workflow page and click Run Workflow to load it into a machine instance. This action launches a ComfyUI session, which may take up to 5 minutes to initialize. When the ComfyUI interface appears, queue the workflow to confirm that it runs successfully. Next, open the Workflow menu (in the latest version, this is located in the upper-left corner) and choose Export (API). This generates a JSON file containing all nodes, inputs, default values, and connections used in the workflow.
Alt Export API in ComfyUI
The exported API file for this workflow will look like the example below: runcomfy-flux-workflow-api.json.
Since the nodes in the API JSON are identified by Node IDs, it can be helpful to display these IDs directly in the workflow interface. To do this, open the Settings panel in ComfyUI (in the latest version, this is located in the lower-left corner), select Lite Graph, and set Node ID Badge Mode to Show All. This allows you to match node IDs between the interface and the JSON file more easily.
Alt Enable Node ID display in ComfyUI
Carefully review the exported JSON to identify which inputs you want to make dynamic, such as prompt text or noise seed. These dynamic inputs can be overridden through API calls for flexible customization, while all other parameters will continue using the workflow’s defaults. When sending API requests, include an overrides JSON object that modifies only those selected inputs. This avoids retransmitting the full workflow and keeps calls efficient. Overrides should be formatted with node IDs (taken from the JSON) as keys, and values as {"inputs": {input_key: new_value}}. Accuracy in both keys and values is essential to prevent errors. For this workflow, you can begin with the example below.
Alt Example API Overrides JSON
{
  "overrides": {
    "6": {
      "inputs": {
        "text": "Your custom prompt here"
      }
    },
    "25": {
      "inputs": {
        "noise_seed": 123456789
      }
    }
  }
}

Step 2: Deploy Workflow as API

Go to the Deployments page and select Deploy workflow as API. Search for the workflow by its name (RunComfy/FLUX) or ID (00000000-0000-0000-0000-000000001111). For a quick setup, choose Instant Deploy, which uses default settings like 48GB hardware (A6000) and autoscaling. These settings can be adjusted later if needed. After the deployment is complete, copy the deployment_id — you’ll need it when making API calls.

Step 3: Authenticate

Click your profile icon (upper-right corner of the RunComfy page) to access the Profile page and find your API key. Include it in every request via the Authorization: Bearer <your-api-key> header. This secures your calls and helps track usage.

Step 4: Submit a Request

Now it’s time to run your deployed workflow. Send a POST request to the inference endpoint, replacing {deployment_id} with your actual deployment ID. In the request body, include the overrides you prepared in Step 1 under the overrides field. This tells RunComfy exactly which inputs to customize while keeping all other workflow settings as-is.
curl --request POST \
  --url https://api.runcomfy.net/prod/v1/deployments/{deployment_id}/inference \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer <token>" \
  --data '{
    "overrides": {
      "6": {
        "inputs": {
          "text": "Your custom prompt here"
        }
      },
      "25": {
        "inputs": {
          "noise_seed": 123456789
        }
      }
    }
  }'
Expected response:
{
  "request_id": "{request_id}",
  "status_url": "https://runcomfy.com/api/v1/deployments/{deployment_id}/requests/{request_id}/status",
  "result_url": "https://runcomfy.com/api/v1/deployments/{deployment_id}/requests/{request_id}/result",
  "cancel_url": "https://runcomfy.com/api/v1/deployments/{deployment_id}/requests/{request_id}/cancel"
}
Note: If your workflow requires media inputs, you can pass them in overrides as either URLs or Base64-encoded data. For complete formatting details, see the Async Queue Endpoints section.

Step 5: Monitor and Retrieve Results

After submitting a request, you can track its progress and fetch the outputs once it’s ready. To monitor the job, poll the status_url at regular intervals until the status changes to "completed". When the job is complete, use the result_url to retrieve the final outputs. Check Request Status:
curl --request GET \
  --url https://api.runcomfy.net/prod/v1/deployments/{deployment_id}/requests/{request_id}/status \
  --header "Authorization: Bearer <token>"
Example response:
{
  "status": "in_queue",
  "queue_position": 0,
  "result_url": "https://runcomfy.com/api/v1/deployments/{deployment_id}/requests/{request_id}/result"
}
Retrieve Request Results:
curl --request GET \
  --url https://api.runcomfy.net/prod/v1/deployments/{deployment_id}/requests/{request_id}/result \
  --header "Authorization: Bearer <token>"
Example response:
{
  "status": "succeeded",
  "outputs": {
    "136": {
      "images": [
        {
          "url": "https://example.com/ComfyUI_00001_.png",
          "filename": "ComfyUI_00001_.png",
          "subfolder": "",
          "type": "output"
        }
      ]
    }
  },
  "created_at": "2025-07-22T13:05:16.143086",
  "finished_at": "2025-07-22T13:13:03.624471"
}
🎉 Congratulations! You’ve successfully deployed and called your first API. Your ComfyUI workflow is now live and ready to power real applications!