Venice keysVeniceLearn · GuidesOpen Venice ↗
Guide · Video

Automating AI video generation with the Venice API

Build two end-to-end automation workflows on the Venice API: one that turns a text prompt into video, and one that generates an image first and then animates it. You will learn how to set parameters, poll a long-running queue, and clean up finished jobs.

Watch the full walkthrough
What you'll learn
  • How to get Venice API credit and create an API key
  • How to set model, prompt, duration, resolution, and aspect ratio parameters
  • How the queue-and-poll system handles slow video generation
  • How to chain image generation into image-to-video animation
  • Where to find current model names, parameters, and pricing

Why automate video, and the two workflows

Venice gives you premium AI video models, both open source and proprietary, in one interface. For one-off generations the web app is enough, but when you want video as part of a repeatable project, you drive it through the Venice API.

This guide covers two automation workflows. The first takes a text prompt and returns a video. The second generates an image from a prompt, then feeds that image into a video model to animate it. Both are demonstrated in n8n, but the API calls and logic apply to any automation tool.

Setting up your Venice API credentials

Before anything runs, your account needs API credit, either DIEM or USD. Open the API page from the sidebar, then click generate new API key and copy it. You will paste this key into your workflow's parameters so each request authenticates.

Keep the key out of shared files. In the workflows shown, the key is passed in alongside the other parameters at the start of the run.

Setting parameters, choosing models, and pricing

The workflow starts with a manual trigger, then a node that sets all the parameters the API needs. At minimum that is your API key, the prompt, the model, and the video duration.

Model names and their valid options live on the Venice docs model page under video models. That page tells you exactly which resolutions a model supports and which durations are allowed. For example, the 1.2.5 preview image-to-video model offers three resolution options and durations of either five or ten seconds, so your duration field must be 5 or 10. The page also shows general pricing, though prices can change. For an exact cost before you generate, Venice exposes a video quote endpoint (not covered here).

Two extra fields are added in the demo. Click add field to add resolution set to 720p, and add aspect_ratio set to 16:9 for standard horizontal video. Other available request fields include an image URL (for image-to-video) and a negative prompt to specify what you do not want to appear.

How the queue and polling system works

Video generation is slow, so the API is asynchronous. The workflow first calls the queue video job endpoint, sending the parameters as JSON. The job comes back marked in progress rather than finished.

From there the workflow polls the queue endpoint and checks the status on each pass. If the generation is complete, it downloads the video and then sends one final cleanup request that deletes the generation job, since the file has already been retrieved. If the video is not ready, it increments the poll count, waits 10 seconds, and checks again.

This loop continues until the video is ready or it hits the maximum of 60 polls, at which point it returns a timeout error. In practice the demo completed well before that limit.

Live demo: text to video

With a cyberpunk prompt set, the workflow is triggered and begins looping. Each loop is roughly a 10-second wait, so 13 loops is about 130 seconds. The run in the demo finished after 24 loops.

The workflow does not place the file anywhere automatically, so the finished video lands on the n8n server, where you click download to retrieve and open it. The result is the generated cyberpunk video produced entirely from the text prompt.

Workflow 2: chaining image generation into video

The second workflow generates an image first, then animates it. The parameters now include the API key, an image prompt (a majestic dragon perched on a mountain peak at sunset), and a separate video prompt (the dragon spreads its wings and breathes fire into the sky).

It uses two models: an image model, set here to Nano Banana Pro for quality, and a video model, set to Veo 3.1 fast. As always, current model names come from the Venice docs page. The image is generated as a square, with the expectation that the video model converts it to 16:9 horizontal.

The image node generates the picture from the prompt, model, and size, then returns an image URL. That URL is passed into the video generation request, and from there the same queue-and-poll process runs as in the first workflow.

Dragon demo and getting the templates

Triggering the image-to-video workflow, the dragon video finished after 13 loops, animating the generated still into the requested fire-breathing shot.

Both workflows are available as downloadable n8n files and make good starting points to adapt for your own projects. For help or ideas, the Venice Discord is an active community of builders sharing workflows like these.

Key takeaways

Adapted from the @askvenice video on YouTube. Models and prices change fast; verify current details in Venice before production use.