ComfyUI Workflow
Text2Video Workflow
Generate videos from text descriptions using advanced AI models.
This workflow extends the base ComfyUI Workflow functionality to support text-to-video generation.
Example Request
Example Response
Workflow ID Mapping
Workflow ID | Model |
---|---|
1 | Hunyuan |
Parameters
Type: Text2VideoTask
Property | Type | Required | Description |
---|---|---|---|
workflow_id | string | true | The ID of the workflow to execute. |
prompt | string | true | The prompt to use for the video generation. |
width | number | false | The width of the video. Default is 848. |
height | number | false | The height of the video. Default is 480. |
length | number | false | The length of the video in frames. Default is 37. |
steps | number | false | The number of steps to use for the video generation. Default is 30. |
seed | number | false | The seed to use for the video generation. |
fps | number | false | The frames per second of the video. Default is 24. |
quality | number | false | The quality of the video. Default is 80. |
job_id_prefix | string | false | An optional prefix for the job ID. Default is “sdk-workflow”. |
timeout_seconds | number | false | The timeout for the task in seconds. If the task is not finished within the timeout, it will be canceled. |
consumer_id | string | false | The ID of the consumer. |
api_key | string | false | The API key of the consumer. |
Returns
Type: WorkflowTaskResult
Property | Type | Required | Description |
---|---|---|---|
task_id | string | true | The ID of the executed task. |
status | enum | true | The status of the task. |
result | any | false | The result of the task, if available. |
task_details | any | false | The details of the task, if available. |
timeout_seconds | number | false | The timeout for the task in seconds. |
workflow_id | string | false | The ID of the workflow that executed the task. |
create_timestamp | number | false | The timestamp when the task was created. |
inference_latency | number | false | The latency of the inference in seconds. |
upload_latency | number | false | The latency of the upload in seconds. |
Authentication
Authentication uses a combined consumer ID and API key format: consumerId#apiKey
. You can provide these in two ways:
- In the Heurist client initialization using environment variables:
- In the
Text2VideoTask
object, the task-specific values will override the client defaults if provided.
Types
Text2VideoTask
A class representing a text-to-video task, extending the abstract WorkflowTask
class.
WorkflowTaskType
An enum representing the types of workflow tasks.