Nodes/ComfyUI-APIMaster/APIMaster Video
ComfyUI Node

APIMaster Video

Sora 2 clips straight into your output folder

By apimaster-ai·Created 22 days ago·Updated 17 days ago· 1
APIMaster Video
  • config
  • reference_image
  • video_path
  • task_id
◄prompta waterfall forming a rainbow, cinematic►
◄modelseedance-2.5►
◄duration4►
◄resolution720p►
◄aspect_ratio16:9►
◄filename_prefixapimaster►
◄model_override►

Video is where the local/cloud gap is still real. You can run Wan or HunyuanVideo on your own card and get something, but the models people actually want - Sora 2, Kling, Seedance - are things you call, not things you download. (MiniMax H3, also in this node's list, is the exception that proves the rule: its weights did open in August 2026, under a licence that excludes the US, EU, UK and Korea, so for most readers here it's still the hosted route.) APIMaster Video is that call, wrapped so the result lands in ComfyUI/output as a normal MP4 instead of in a web tab you have to right-click.

Sora 2 talk saturates the subreddits by now, but almost all of it is about the app; image-to-video through an API node is a much smaller crowd, and this is a straightforward way in.

How the job runs

There's no sync mode here, and that's correct: video takes minutes. The node POSTs your prompt and settings to {base_url}/videos/generations, gets a task_id back, waits fifteen seconds before the first poll (a job that just started is never ready), then polls /videos/{task_id} every four seconds for up to 240 attempts - roughly sixteen minutes - printing a status line to the console every fifth poll. When it completes it downloads the result (with a generous 600-second download timeout) and writes the file.

The filename is built for you: {filename_prefix}_{model}_{last 8 chars of task_id}.mp4, in ComfyUI's output directory. Because the node is an output node, it runs when you hit Queue, and it puts a line in its own UI text showing the filename and the file size in MB.

The settings that decide whether it works

config from an APIMaster Config node, prompt, and model - a dropdown of eight ids spanning several vendors (sora-2, sora-2-pro, seedance-2.5, seedance-2.0, kling-v3-motion-control, kling-v3-omni, MiniMax-H3, grok-imagine-video-1.5). These are different companies' hosted models behind one endpoint, which means their real limits differ, and the node only special-cases one of them (see below). The most reliable way to learn what a given id actually serves is to try it.

duration is an integer from 4 to 20 in steps of 4 - so 4, 8, 12, 16 or 20 seconds. resolution is 720p, 1024p or 1080p. aspect_ratio has exactly two options, 16:9 and 9:16, with no "auto" - set it on purpose. filename_prefix is cosmetic but useful when you're generating a lot: name it after the project, not apimaster.

Optional: reference_image turns this into image-to-video, and model_override lets you type an id that isn't in the dropdown.

Outputs are video_path - a STRING holding the absolute path to the MP4 - and task_id, also a STRING. Note what's not here: no VIDEO socket, so this doesn't plug into ComfyUI's video nodes as a live object. You get a file on disk and a string. To get it back into a graph, copy that path into whatever video-loader your workflow uses, or just open it.

Three traps, all avoidable

sora-2 is 720p only. Ask for 1080p with sora-2 selected and the node quietly falls back to 720p, logging "sora-2 only serves 720p - falling back. Use sora-2-pro for 1024p/1080p." You get a video, just not the resolution you asked for. If you need 1024p or 1080p, pick sora-2-pro deliberately rather than discovering the fallback in a log line later.

Always set aspect_ratio for image-to-video. This is the README's own warning and it's the one that ruins takes: a portrait reference image with the aspect left at the default 16:9 gets treated as widescreen by the gateway, and you get your subject letterboxed inside a wide frame. Feeding a vertical phone photo? Set 9:16 before you queue.

A batch reference image only ever uses the first frame. Image-to-video sends frame 0, JPEG-encoded, and ignores the rest of the batch. Don't hand it a 24-frame sequence expecting motion transfer.

Install

Manager: search APIMaster and restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/apimaster-ai/ComfyUI-APIMaster

No pip install - the pack has an intentionally empty requirements list and uses Python's standard library for HTTP, so adding it won't disturb your existing environment. Then:

export APIMASTER_API_KEY=sk-...

before starting ComfyUI, and leave the key field on the Config node empty. Typed-in keys get saved into the workflow JSON, which is a thing people post publicly.

Where it goes wrong

HTTP 401 is the key; HTTP 402 is an empty balance; HTTP 404 is usually a base_url without /v1. A failed job raises with the upstream status and a slice of the response, which is more than most nodes give you. If you see "Gave up polling the video task after ~16 minutes", the job wasn't necessarily dead - keep the task_id output and check it wherever your provider exposes task status, because the node stops looking, the gateway doesn't.

Budget-wise, video is metered per second in a way images aren't, and several of these models are the expensive end of that. Stay at 720p/4s while you're checking whether the prompt works, then spend on the real take. And remember the mechanism: your prompt and reference frame go to a third party, subject to their moderation, with no local patch for that.

CategoryAPIMaster

Inputs (9)

NameTypeDefaultDescription
configAPIMASTER_CONFIG—
promptSTRINGa waterfall forming a rainbow, cinematic—
modelCOMBOseedance-2.56 options: seedance-2.5, seedance-2.0, kling-v3-motion-control, kling-v3-omni, MiniMax-H3, grok-imagine-video-1.5
durationINT44–20—
resolutionCOMBO720p3 options: 720p, 1024p, 1080p
aspect_ratioCOMBO16:92 options: 16:9, 9:16
filename_prefixSTRINGapimaster—
reference_imageoptIMAGE—
model_overrideoptSTRING—

Outputs (2)

NameTypeDescription
video_pathSTRING—
task_idSTRING—