Generating AI videos in n8n: Sora 2, Veo 3 and the full pipeline
Published 16 August 2026 · 5 min read
Since 2025, AI video generation has moved from an impressive prototype to an API you can actually wire into a production pipeline. The theoretical groundwork for that leap traces back to Ho, Salimans, Gritsenko, Chan, Norouzi and Fleet, "Video Diffusion Models," presented at NeurIPS 2022 (see on Google Scholar): the authors show that a standard diffusion model, adapted to handle sequences of frames rather than a single image, is enough to generate coherent video. Three years on, Sora 2 at OpenAI and Veo 3 at Google expose that technology behind a plain HTTP API. Here's how to build a complete n8n pipeline: AI-written script, video generation, assembly, publishing.
Sora 2 and Veo 3: two APIs, one node
Sora 2 (OpenAI). OpenAI's Videos API accepts a text prompt and returns an asynchronous job: you submit the request, then poll the status regularly until you get the video file's URL. With no native node, a plain HTTP Request using your OpenAI credential handles the submission call.
Veo 3 (Google, via the Gemini API or Vertex AI). Same logic on the Google side: submit a prompt (optionally with a reference image for the first frame), then poll a long-running operation until the result is available. The HTTP Request node covers this too, using the Google Gemini credentials you already set up for your text workflows.
The asynchronous pattern is identical in both cases: submit, then wait. A Wait node of a few tens of seconds between each poll avoids hammering the API in a tight loop, and retries with backoff absorb transient errors — a video render takes anywhere from 30 seconds to several minutes depending on the requested duration and resolution.
Have an LLM write the script before generating
A poorly built video prompt produces incoherent or off-topic shots — even more so than with images, since you now have to describe an action unfolding over time. The robust pattern adds, just like for images, a writing stage: an LLM Chain turns the raw subject (a product hook, a content idea) into a detailed shot-by-shot script — visual description, camera movement, duration, sound mood. Lock the output with a Structured Output Parser (scene, visual_prompt, duration_seconds, ratio fields): this is exactly the LLM Chain + Structured Output Parser architecture already used in the Inbox AI Pack for email classification, rewired for a creative use case.
Anchoring the video on a reference image
Both APIs accept, alongside the text prompt, a reference image (image-to-video): the model animates that visual instead of generating a shot entirely from scratch. This is the most reliable use case for e-commerce — a product photo generated with the AI image pipeline serves as the opening frame, and the video API just adds a camera move or a staged scene on top. The gain is twofold: the product's visual consistency (color, shape, logo) is guaranteed by the source image rather than left to the video model, and the prompt you need to write shrinks down to describing the motion — which cuts the rate of renders you have to throw away.
Assembling multiple scenes
Current models generate short clips (typically 4 to 12 seconds): a longer narrative video is built by generating each scene separately and chaining them together. A Loop Over Items loop walks the scene array produced by the Structured Output Parser, submits each prompt to the video API, and collects the resulting files as they complete. The final edit (concatenation, transitions, subtitles, soundtrack) falls outside the scope of a plain HTTP call: a rendering service like Shotstack or Creatomate is called with the same HTTP Request + polling pattern, fed the list of generated clips. Videos travel as sizeable binary data between nodes: our guide to large files and binary data explains how to avoid exhausting the instance's memory under this kind of load.
Store, validate, then publish
Always store the raw file before any post-processing — rendering is expensive, and regenerating it by mistake doubles the bill. An S3 bucket or Google Drive works fine, with metadata (prompt, model, cost, scenes) logged in a Data Table. Before publishing, a human validation step via Slack is still worth keeping until your prompts are battle-tested: unlike a bad piece of text, a bad video is obvious at a glance.
On the distribution side, the generated video plugs into your existing pipelines: upload with AI-generated metadata to YouTube, publishing to TikTok or Instagram, or a relay to LinkedIn for B2B content.
Costs and guardrails
Billing runs on seconds of rendered footage, not per clip: Sora 2 standard sits around $0.10/s at 720p, and the Pro version between $0.30 and $0.70/s depending on resolution — so a 10-second clip costs $1 to $7 depending on the quality tier. A batch rate (deferred submission, result within 24 hours) cuts the bill in half for non-urgent uses, typically an overnight scheduled production run. This per-generation cost makes AI cost tracking — already recommended for text and images — non-negotiable here: a generation cap per execution, and a log tracing every render with its real cost.
A second guardrail, specific to this still-young market: video APIs move fast. OpenAI, for instance, announced the retirement of the original Sora 2 API for late September 2026, in favor of later versions — a much shorter lifecycle than text APIs typically have. Isolate the generation call in a dedicated sub-workflow, with the same multi-provider fallback logic used for text LLMs: one place to update if a provider changes model version or pricing.
Finally, keep prompts away from third-party brands, identifiable real people, and known voices or styles — commercial usage terms vary by provider and tend to tighten as the technology matures.
Verdict
An AI video pipeline in n8n breaks down into five stages: an LLM splitting the subject into structured scenes, an HTTP Request call in submit-and-poll mode against Sora 2 or Veo 3, an assembly loop for multi-scene videos, storage with human validation, and multi-platform publishing. The build is heavier than for images or text, but it rests on the same n8n building blocks you've already mastered elsewhere in your workflows — enough to industrialize a content format that, just a year ago, still required a video editor for every single iteration.
FAQ
Frequently asked questions
Is there a native n8n node for Sora or Veo?
No, neither OpenAI nor Google currently ship a native n8n integration for video generation. Both are driven with the HTTP Request node: an authenticated request with the prompt and parameters (duration, resolution, ratio), then a pickup of the result once rendering finishes — exactly like any other asynchronous API.
How much does it cost to generate a video with AI?
Video APIs bill per second of rendered footage, not per clip. Sora 2 standard runs around $0.10 per second at 720p, and the Pro version between $0.30 and $0.70 depending on resolution — roughly $1 to $7 for a 10-second clip. A batch rate (asynchronous submission with a 24-hour SLA) cuts the bill in half for non-urgent uses.
Can multiple scenes be chained into a longer video?
Yes, but not in a single call: each generation produces a short clip (a few seconds), so a narrative video is built by generating each scene separately and then stitching them together. n8n orchestrates scene-by-scene generation with a loop, but the final edit (concatenation, transitions, soundtrack) sits outside the scope of a plain HTTP Request node and usually goes through an external editing service called the same way.
What happens if the video API in use changes or disappears?
Video generation APIs move fast: OpenAI, for instance, announced the retirement of the original Sora 2 API for late September 2026, in favor of later versions. The fix is the same as for text LLMs: isolate the API call in a dedicated sub-workflow, so only one place needs updating if a provider changes model version or pricing.
Bundle FlowKit Complet
€269