Actions12
- Image Actions
- Video Actions
- Virtual Try-on Actions
- Account Actions
Overview
The "Text to Video" operation of the Kling AI node enables users to generate videos from textual prompts using Kling AI's video generation API. This node is useful for automating creative workflows where video content needs to be generated dynamically based on descriptive text input. For example, marketing teams can create promotional videos from product descriptions, educators can generate visual aids from lesson plans, or content creators can produce short clips from story scripts.
The node sends a request to the Kling AI API with parameters such as the chosen model, prompt text, video mode, duration, and additional options like aspect ratio or callback URLs. The API then processes the request asynchronously and returns metadata about the video generation task.
Properties
Name | Meaning |
---|---|
API Token | JWT token used for authenticating requests to the Kling AI API. It must be generated with specific header and payload claims and should not include the "Bearer" prefix. |
Model | The video generation model to use. Options: "Kling V1", "Kling V1-6". |
Prompt | The textual description or prompt from which the video will be generated. |
Mode | The video generation mode. Options: "Standard" (std), "Professional" (pro). |
Duration | Length of the generated video. Options: "5 Seconds", "10 Seconds". |
Additional Options | A collection of optional parameters to customize the video generation: |
- Negative Prompt | Text describing elements to avoid in the video generation. |
- CFG Scale | A number between 0 and 1 indicating flexibility in video generation; controls how strictly the model follows the prompt. |
- Aspect Ratio | Aspect ratio of the output video. Options: "16:9", "9:16", "1:1". |
- Callback URL | URL that Kling AI will call when the video generation is complete, enabling asynchronous notification. |
- External Task ID | Custom identifier for tracking the video generation task externally. |
Output
The node outputs JSON data representing the response from the Kling AI API after submitting the video generation request. This typically includes metadata such as:
- Task identifiers (e.g., task ID)
- Status of the video generation request
- Any relevant URLs or references to the generated video once available
- Additional information returned by the API about the processing state
The node does not directly output the video binary data but provides references to it via the API response. If a callback URL is provided, the user can receive asynchronous updates when the video is ready.
Dependencies
- Requires access to the Kling AI API endpoint at
https://api.klingai.com
. - An API token credential in the form of a JWT token is mandatory for authentication.
- Network connectivity to the Kling AI service.
- Optional: A publicly accessible callback URL if asynchronous notifications are desired.
Troubleshooting
Authentication Errors:
Error messages indicating authentication failure usually mean the JWT token is invalid, expired, or improperly formatted. Ensure the token is generated correctly without the "Bearer" prefix and contains valid claims (iss
,exp
,nbf
).Missing Required Parameters:
Omitting required fields likeprompt
,model
, orduration
will cause errors. Double-check all mandatory inputs are provided.API Rate Limits or Quotas:
If the API returns rate limit errors, consider reducing request frequency or checking your account resource packages.Callback URL Issues:
If using a callback URL, ensure it is reachable and properly handles incoming POST requests from Kling AI.Invalid Option Values:
Providing unsupported values for options likeaspectRatio
ormode
may result in API errors.Network Connectivity:
Failures to reach the API endpoint could be due to network issues or firewall restrictions.
Links and References
- Kling AI API Documentation (general reference): https://docs.klingai.com
- JWT Token Generation Guidelines: Refer to standard JWT libraries and Kling AI-specific claims requirements.
- n8n Documentation on HTTP Request Nodes and Authentication: https://docs.n8n.io/
This summary is based solely on static analysis of the provided source code and property definitions.