AI/ML API Video Generator (LTXV / Veo 3.1)
LTXV-2 and Veo 3.1 video, inside ComfyUI, at API speed
- image
- video_url
- generation_id
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) andgenerate_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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | Your AI/ML API key from https://aimlapi.com/app/keys | |
| model | COMBO | ltxv/ltxv-2 | Choose between LTXV-2 or Google Veo 3.1 image-to-video |
| prompt | STRING | A cinematic drone shot over neon-lit city streets at night | Scene description for the video |
| imageopt | IMAGE | Optional reference frame. Required for Google Veo 3.1 image-to-video | |
| image_urlopt | STRING | HTTPS link or data URI for the reference frame | |
| durationopt | INT | 84–12 | Video duration (seconds) |
| resolutionopt | COMBO | 1080p | Output resolution. LTXV supports up to 4K, Veo supports up to 1080p |
| aspect_ratioopt | COMBO | 16:9 | Aspect ratio for framing |
| fpsopt | INT | 2412–60 | Frames per second (LTXV only) |
| generate_audioopt | BOOLEAN | true | Toggle model-generated audio when supported |
| poll_intervalopt | FLOAT | 51–30 | Seconds between status checks |
| poll_timeoutopt | INT | 48060–1800 | Maximum seconds to wait before timing out |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |
| generation_id | STRING | — |