Nodes/comfyui-aimlapi-custom-nodes/AI/ML API Video Generator (LTXV / Veo 3.1)
ComfyUI Node

AI/ML API Video Generator (LTXV / Veo 3.1)

LTXV-2 and Veo 3.1 video, inside ComfyUI, at API speed

By konradbjk·Created 7 months ago·Updated 7 months ago· 1
AI/ML API Video Generator (LTXV / Veo 3.1)
  • image
  • video_url
  • generation_id
api_key
modelltxv/ltxv-2
promptA cinematic drone shot over neon-lit city streets at night
image_url
duration8
resolution1080p
aspect_ratio16:9
fps24
generate_audiotrue
poll_interval5
poll_timeout480

This is the node most people download the pack for. Video generation is where the local/cloud divide gets brutal - running LTXV-2 or Veo 3.1 locally means VRAM, patience, and a machine that does nothing else for an hour. This node sends the job to AI/ML API's hosted endpoint instead, so you get video from inside ComfyUI on a laptop, and it's the text-to-video / image-to-video workhorse of the five-node suite.

Pick your model and you're picking a philosophy. ltxv/ltxv-2 (default) is Lightricks' speed-first family - the same architecture that made LTX famous for generating faster than it plays, and since LTX-2, with synchronized audio baked in. Through the API you don't need a reference image at all, you can crank fps, and resolutions go up to 2160p. google/veo-3-1-image-to-video is the quality pick - Veo 3.1 is the closed model with native audio and, honestly, no open equivalent that touches it yet. It requires a reference image, tops out at 1080p, and ignores fps entirely. The node is honest about this split: it validates your resolution against each model and will refuse 1440p/2160p on Veo.

How it works. Different flow from the image nodes. It POSTs a payload to https://api.aimlapi.com/v2/video/generations, gets back a generation_id, then polls the endpoint every poll_interval seconds (default 5) until the video is ready or poll_timeout (default 480s) expires. That means the node blocks the queue while it waits - you're not running other jobs during that window. It recognizes failure states like canceled and expired and raises them as errors, and it returns two outputs: video_url (a STRING) and generation_id.

The inputs that matter. For a quick first run: api_key, prompt, and that's honestly it. The optional stuff:

  • image / image_url - the reference frame. Required for Veo, ignored-or-optional for LTXV. Provide either a tensor (it becomes a base64 data URI) or a direct HTTPS URL to skip the encoding.
  • duration - 4–12 seconds.
  • fps (LTXV only, 12–60) and generate_audio (defaults to True - Veo produces sound natively, and LTX-2 does too).
  • poll_interval / poll_timeout - if your job is slow, raise the timeout up to 1800s rather than letting it die at 8 minutes.

One real gotcha: there's no built-in save node in this pack. video_url is a string, so you need a downloader node or a browser tab to actually keep the file. Plan for that before you run a 12-second 4K job.

Installing it. Manager search comfyui-aimlapi-custom-nodes, or the standard clone:

cd ComfyUI/custom_nodes
git clone https://github.com/konradbjk/comfyui-aimlapi-custom-nodes

Restart, and you'll find all five nodes under "AI/ML API". Dependencies are minimal (requests, pillow, numpy - torch is already in ComfyUI's venv) and there are no model downloads. Everything runs remotely, billed per generation.

What usually bites people. The timeouts - default 480s is usually enough for an 8s clip, but heavy 4K LTXV or a congested Veo queue will hit it; the error message tells you the last status, so bump poll_timeout rather than restarting. And remember the generation_id output is genuinely useful: if a run fails or you need to look the job up in AI/ML API's dashboard, that's your handle. Video credits burn fast, so double-check resolution and duration before you hit run.

CategoryAI/ML API

Inputs (12)

NameTypeDefaultDescription
api_keySTRINGYour AI/ML API key from https://aimlapi.com/app/keys
modelCOMBOltxv/ltxv-2Choose between LTXV-2 or Google Veo 3.1 image-to-video
promptSTRINGA cinematic drone shot over neon-lit city streets at nightScene description for the video
imageoptIMAGEOptional reference frame. Required for Google Veo 3.1 image-to-video
image_urloptSTRINGHTTPS link or data URI for the reference frame
durationoptINT84–12Video duration (seconds)
resolutionoptCOMBO1080pOutput resolution. LTXV supports up to 4K, Veo supports up to 1080p
aspect_ratiooptCOMBO16:9Aspect ratio for framing
fpsoptINT2412–60Frames per second (LTXV only)
generate_audiooptBOOLEANtrueToggle model-generated audio when supported
poll_intervaloptFLOAT51–30Seconds between status checks
poll_timeoutoptINT48060–1800Maximum seconds to wait before timing out

Outputs (2)

NameTypeDescription
video_urlSTRING
generation_idSTRING