demobook

n8n: Generate Sora 2 videos via Kai API

n8nTry it →Watch full video →Kyle Friel | AI Software ·

Demo summary

The creator shows how to use an HTTP Request node in n8n to send prompts and image URLs to the Kai API to trigger Sora 2 video generation.

Step-by-step

  1. Add an HTTP Request node in n8n.
  2. Copy the cURL request from the Kai API Sora 2 image-to-video documentation.
  3. Click Import cURL in the n8n node and paste the command to auto-configure the fields.
  4. Set Authentication to Generic Credential Type and select Bearer Auth to securely store your Kai API key.
  5. Open the Body expression and replace the hard-coded prompt value with the dynamic output from your AI agent node.
  6. Apply a .replace() function to the prompt expression to remove double quotes and line breaks (\n) to prevent JSON formatting errors.
  7. Add an 'image_urls' field to the JSON body and drag in the image URL variable from your data source.
  8. Click Execute Step to test the video generation.

Options

  • Paste the API key directly into the header (not recommended for reusability)
  • Use Cloudinary to host images for publicly accessible URLs

Watch out for

  • Image URLs must be publicly accessible without passwords or authorization headers.
  • Double quotes or line breaks within the dynamic prompt text will break the JSON payload and cause the request to fail.
  • Ensure you copy the 'Sora 2 image-to-video' cURL specifically, rather than the 'text-to-video' version if using an image input.

Tips

  • Use the Bearer Auth credential type so you don't have to manually paste your API key into every new HTTP node.
  • Wrap dynamic values in double quotes within the JSON expression to maintain valid syntax.
  • Use a replace function to clean up text 'blobs' to ensure the HTTP request doesn't fail due to formatting.

Highlights

Then I just clicked copy URL and pasted that into my Google sheet like so. Super simple.

All demos from “This AI Workflow Creates Viral UGC Ads for $0.15 (Sora 2 + n8n Agents)

  1. 6:023:42Generate video prompts with GPT-4o-miniThe creator configures an n8n AI Agent node using GPT-4o-mini to transform product features and customer data into detailed cinematic prompts for Sora 2.n8nAI Video Prompt Generator
  2. 9:445:26Generate Sora 2 videos via Kai APICurrentThe creator shows how to use an HTTP Request node in n8n to send prompts and image URLs to the Kai API to trigger Sora 2 video generation.n8nAI Animation Generator
  3. 24:101:26Review AI-generated UGC video adsThe video shows the final output of the Sora 2 model, demonstrating AI-generated videos for a cold brew concentrate and a protein shake based on the automated workflow.n8nAI Commercial Generator
  4. Watch “This AI Workflow Creates Viral UGC Ads for $0.15 (Sora 2 + n8n Agents)” →

AI Animation Generator

  1. 9:445:26Generate Sora 2 videos via Kai APICurrentThe creator shows how to use an HTTP Request node in n8n to send prompts and image URLs to the Kai API to trigger Sora 2 video generation.Kyle Friel | AI Software