api-doc
general-workflow-api
CreateTask

CreateTask

description

Create a task for workflow

Usage

URL

https://api.comfyonline.app/api/run_workflow

Header

{
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${token}` 
}

Params

{
  input: {

  }, // input
  workflow_id: string,
  webhook: string // If filled, the url will be requested on task completion with the task results
}

Response

{
  data?: {
    task_id: string // task_id, query the status of the task by this id, or receive a webhook
  },
  success: boolean,
  errorMsg: string,
  error_code: number
}

Input

The following node-specific parameters are considered input parameters for the entire workflow, if these node parameters are not passed in by other nodes.

    "CLIPTextEncode": [
        {key: "text", type: "string"}
    ],
    "LoadImage": [
        {key: "image", type: "string"}
    ],
    "VHS_LoadVideoPath": [
        {key: "video", type: "string"}
    ],
    "VHS_LoadVideo": [
        {key: "video", type: "string"}
    ],
    "easy int": [
        {key: "value", type: "int"}
    ],
    "easy float": [
        {key: "value", type: "float"}
    ],
    "easy string": [
        {key: "value", type: "string"}
    ],
    "easy boolean": [
        {key: "value", type: "boolean"}
    ],
    "Text Multiline": [
        {key: "value", type: "string"}
    ],

Output

All files generated in the output directory will be used as output.