Video Node
AI-generatedOverview
This node creates a talking avatar video generation task by combining a base64-encoded audio file (speech) with a base64-encoded image (avatar face). It sends these inputs to an external API that asynchronously generates a video of the avatar speaking the provided audio. The node supports both asynchronous operation, where it immediately returns the task status, and synchronous operation, where it polls the task status until completion or timeout.
Common scenarios:
- Generating personalized avatar videos for marketing or customer engagement.
- Creating dynamic video content with custom speech and avatars.
- Automating video creation workflows where avatars speak user-provided audio.
Practical example:
You provide a base64-encoded image of a character's face and a base64-encoded audio clip of a message. The node submits these to the service, which returns a video of the avatar speaking the message. You can either receive the task ID immediately (async) or wait synchronously for the video generation to complete.
Properties
| Name | Meaning |
|---|---|
| Audio (Base64) | The base64 encoded audio file to use as the avatar's speech. |
| Image (Base64) | The base64 encoded image to use as the avatar's face. |
| Synchronous | Whether to wait synchronously for the video generation to complete (true) or return immediately (false). |
| Time Out (Second) | Maximum waiting time in seconds when running synchronously (between 2 and 600 seconds). |
| Webhook Options | Collection of options for async webhook notification: |
| - Auth Token | Authentication token sent via 'Authorization: Bearer' header to secure the webhook callback. |
| - Url | Webhook URL to receive asynchronous task status updates. |
Output
The node outputs JSON data representing the response from the video generation API:
- In asynchronous mode, the output contains the initial task creation response, including a
task_idused to track progress. - In synchronous mode, the node polls the task status endpoint until the task completes or fails, then outputs the final status and related data.
The output JSON structure includes fields such as:
task_id: Identifier of the video generation task.status: Current status of the task (IN_QUEUE,IN_PROGRESS,COMPLETED,FAILED, etc.).- Additional metadata about the generated video or error details if the task failed.
The node does not output binary data directly; instead, it provides metadata and status information about the video generation process.
Dependencies
- Requires an external API service accessible via HTTP(S) to generate talking avatar videos.
- Needs an API authentication token credential to authorize requests.
- Optional webhook URL and auth token for receiving asynchronous task status callbacks.
- The node uses standard HTTP request helpers provided by n8n.
Troubleshooting
Common issues:
- Invalid or missing base64 audio/image input will cause the API to reject the request.
- Incorrect or expired API authentication token will result in authorization errors.
- Network connectivity problems may cause request failures.
- If synchronous mode is enabled but the timeout is too short, the node may throw a timeout error before the video is ready.
Error messages:
"Failed to get valid task_id from server."— The API did not return a valid task identifier; check API response and credentials."Task failed with status: <STATUS>"— The video generation task ended with a failure status likeFAILED,TIMED_OUT, orCANCELED."Error generate a talking avatar video request: <message>"— General request error; inspect the message for details.
Resolutions:
- Verify base64 encoding correctness of audio and image inputs.
- Ensure API token is valid and has necessary permissions.
- Increase synchronous timeout if tasks take longer to complete.
- Use asynchronous mode with webhook callbacks to avoid long waits.
Links and References
- No direct links are provided in the source code. For more information, consult the documentation of the external video generation API service used with this node.