POST
/
run
/
deployment
/
sync
import { ComfyDeploy } from "comfydeploy";

const comfyDeploy = new ComfyDeploy({
  bearer: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await comfyDeploy.run.deployment.sync({
    inputs: {
      "num_inference_steps": 30,
      "prompt": "A beautiful landscape",
      "seed": 42,
    },
    webhook: "https://myapp.com/webhook",
    deploymentId: "15e79589-12c9-453c-a41a-348fdd7de957",
  });

  // Handle the result
  console.log(result);
}

run();
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "data": {},
    "node_meta": "<any>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "type": "<string>",
    "node_id": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
deployment_id
string
required
Example:

"15e79589-12c9-453c-a41a-348fdd7de957"

inputs
object

The inputs to the workflow

Example:
{
  "prompt": "A beautiful landscape",
  "seed": 42
}
webhook
string
webhook_intermediate_status
boolean
default:false
Example:

true

gpu
enum<string>

The GPU to override the machine's default GPU

Available options:
T4,
L4,
A10G,
A100,
A100-80GB,
H100

Response

200
application/json
Successful Response
id
string
required
run_id
string
required
data
object
required
node_meta
any | null
required
created_at
string
required
updated_at
string
required
type
string | null
node_id
string | null