demobook

Generate video using Kling AI (V3) via n8n

n8nTry it →Watch full video →Matt Penny | Applied AI ·

Demo summary

The presenter demonstrates setting up an n8n workflow to request a video of a 'dog playing in the park' using the Kling AI (V3) model through the KIE AI API, including a polling loop to check for completion.

Step-by-step

  1. Navigate to the KIE AI dashboard documentation and select the Kling V3 API.
  2. Copy the cURL command for the POST request to create a video.
  3. In n8n, use the 'Import cURL' feature within an HTTP Request node to paste the command.
  4. Insert your KIE AI API token into the header.
  5. Modify the prompt and model parameters (e.g., change model to 'v3_fast') in the JSON body.
  6. Execute the node to receive a Task ID.
  7. Set up a GET request node using the Task ID to poll for the video status.
  8. Create an 'If' node to check if the 'complete_time' field is populated.
  9. Add a 'Wait' node (e.g., 30 seconds) to loop back to the status check if the video is not yet ready.

Options

  • Input an image for image-to-video generation
  • Set a callback URL to trigger a webhook upon completion instead of polling
  • Toggle watermarking on or off
  • Adjust aspect ratio
  • Switch between standard and fast models

Watch out for

  • The callback URL method is more complex as it requires setting up a separate webhook within n8n.

Tips

  • Use the KIE AI dashboard to manage just one token for multiple different AI models.
  • Set the polling loop to wait 30 seconds rather than 3 seconds to avoid unnecessary API calls, as video generation typically takes a minute or more.
  • Check the 'complete_time' field to determine if the generation process is finished.

Highlights

This is the only token we have to manage. We don't have to deal with all the different API keys that we get from all the different models. We just deal with one.

All demos from “This Tool Makes AI Image & Videos Generation 10x Easier! (KIE AI + n8n)

  1. 1:591:09Generate an image in the KIE AI PlaygroundThe presenter uses the KIE AI web interface to select the Flux model and generate an image of a 'space cowboy' using a text prompt.Kie.aiText to Image
  2. 11:103:53Generate video using Kling AI (V3) via n8nCurrentThe presenter demonstrates setting up an n8n workflow to request a video of a 'dog playing in the park' using the Kling AI (V3) model through the KIE AI API, including a polling loop to check for completion.n8nText to Video
  3. Watch “This Tool Makes AI Image & Videos Generation 10x Easier! (KIE AI + n8n)” →

Text to Video

  1. 11:103:53Generate video using Kling AI (V3) via n8nCurrentThe presenter demonstrates setting up an n8n workflow to request a video of a 'dog playing in the park' using the Kling AI (V3) model through the KIE AI API, including a polling loop to check for completion.Matt Penny | Applied AI