Nodes/NIUNIUAPI/🫎NIUNIU API-Veo3.1视频生成
ComfyUI Node

🫎NIUNIU API-Veo3.1视频生成

Veo 3.1 video with first/last frame control — no GPU, just the API

By xiongmaowf·Created 9 months ago·Updated 8 months ago· 2
🫎NIUNIU API-Veo3.1视频生成
  • 参考图
  • 首帧图
  • 尾帧图
  • 视频
  • 视频URL
  • 响应信息
📝 提示词女人在天上飞
🤖 模型veo_3_1-fast
🌐 API地址https://api.llyapps.com
🔑 API密钥
📐 宽高比Auto
⏱️ 视频时长(秒)8
🎬 高清模式false
🎰 随机种子0
⏳ 超时等待(秒)600

Veo 3.1 is Google's best video model and it is thoroughly closed - native audio in the output, granular editing, better image-to-video, zero open weights. This node is the ComfyUI doorway to it: a prompt (and optionally reference, first-frame, or last-frame images) in, a downloadable mp4 out. No local model, no VRAM, just an API key and a provider that serves veo_3_1.

What makes this one worth reaching for

The differentiator versus a bare curl script is the frame control. The optional inputs are 参考图 (reference image), 首帧图 (first frame), and 尾帧图 (last frame), and the node maps them onto Veo's generation type automatically. Give it a first and last frame and it asks the API for a video that starts and ends where you told it - which is how you steer a closed video model toward a specific shot without any ControlNet. Give it just a reference image and it's effectively image-to-video. Give it nothing and it's plain text-to-video.

The 宽高比 field has a genuinely handy "Auto" mode: with an image wired in, the node inspects it and picks 9:16 for portraits and 16:9 for landscape automatically. If you've ever been burned by a video model silently letterboxing a vertical reference, you'll appreciate that.

How it works

Under the hood it's one multipart POST to /v1/videos carrying model, prompt, size, seconds, a generationType (either TEXT_2_VIDEO or FIRST_AND_LAST_FRAMES_2_VIDEO - note the code labels every image mode with that name, even single-reference runs; that's just what the relay expects), plus the images as PNG files. Then it polls /v1/videos/{id} every five seconds with a small retry loop until the job completes, and grabs the finished video URL - falling back to a /v1/videos/{id}/content download path if the response doesn't include one.

Inputs that matter

  • 提示词 and 模型 - default model is veo_3_1-fast; change it to whatever your provider lists (some relays use veo-3.1 style aliases).
  • API地址 / API密钥 - https://api.llyapps.com by default, any OpenAI-format endpoint works, and a pasted /v1 or /v1/videos suffix gets auto-corrected.
  • 视频时长(秒) - an integer from 1 to 60, default 8. This is your cost dial as much as a creative one; Veo's pricing is per second.
  • 高清模式 - sends quality: high. Longer queue, richer detail.
  • 超时等待(秒) - default 600. Video jobs are slow; if you're queueing a long high-res clip, consider raising it.

Outputs: 视频 (ComfyUI VIDEO type - feed to a save/preview node), 视频URL (string), 响应信息 (JSON with id, status, generation type, seed, and the raw response).

Installing it

Part of the NIUNIUAPI pack, so it installs with the other four. ComfyUI Manager → search "ComfyUI-NIUNIUAPI" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/xiongmaowf/ComfyUI-NIUNIUAPI
# restart ComfyUI

Dependencies: requests, pillow, numpy. No model downloads, nothing heavy - it's a cloud client.

Troubleshooting

The usual suspects: 401 means the key or base URL is wrong; timeout means either your 超时等待 was too short or the relay's queue is long - raise it and rerun. One Veo-specific note: the model's native audio only comes back if your relay actually delivers an audio-bearing file. The node just downloads whatever URL the API returns, so if you expect audio and get silence, that's a provider question, not a node setting. And the standing wrapper-node caveats apply: metered per call, inputs leave your machine, and Google's moderation applies at the source - the node can't and won't bypass it.

CategoryNIUNIUAPI

Inputs (12)

NameTypeDefaultDescription
📝 提示词STRING女人在天上飞
🤖 模型STRINGveo_3_1-fast
🌐 API地址STRINGhttps://api.llyapps.com如 https://api.llyapps.com(也可粘贴到 /v1 或 /v1/videos;会自动纠正)
🔑 API密钥STRING
📐 宽高比COMBOAuto3 options: 16:9, 9:16, Auto
⏱️ 视频时长(秒)INT81–60
🎬 高清模式BOOLEANfalse
🎰 随机种子INT00–2147483647
⏳ 超时等待(秒)INT6001–86400
参考图optIMAGE
首帧图optIMAGE
尾帧图optIMAGE

Outputs (3)

NameTypeDescription
视频VIDEO
视频URLSTRING
响应信息STRING