Text2Video Workflow
Last updated
Last updated
Generate videos from text descriptions using advanced AI models.
This workflow extends the base functionality to support text-to-video generation.
1
Hunyuan
Define environment variables in .env
file:
Copy
Copy
Copy
Type: Text2VideoTask
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.
Type: WorkflowTaskResult
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 uses a combined consumer ID and API key format: consumerId#apiKey
. You can provide these in two ways:
In the Xalora client initialization using environment variables:
Copy
In the Text2VideoTask
object, the task-specific values will override the client defaults if provided.
Copy
Text2VideoTask
A class representing a text-to-video task, extending the abstract WorkflowTask
class.
Copy
WorkflowTaskType
An enum representing the types of workflow tasks.
Copy