API Video Generate (BYOK)
API Video Generate (BYOK)
- VIDEO
One node, four providers, no local model
Video is where "just run it locally" stops being advice. Veo 3 generates synchronized audio and dialogue in the same pass, and as of mid-2026 no open-weight model has matched that. Sora, Runway's Gen-4 line, Veo - all closed, all API-only.
API Video Generate (BYOK) is one node that does all of it. Pick a provider from a dropdown - gemini, openai, azure, runwayml - and the rest of the fields change to match. That's the feature: the dropdown only offers the combinations that provider actually accepts, so there's no guessing which aspect ratio and resolution go together.
BYOK means your key, straight to the provider, with no Comfy account or credit wallet in between - the difference from ComfyUI's official Partner Nodes, which are the vetted path on metered credits.
How it works
LiteLLM does the provider translation. Most providers are submit-and-poll: avideo_generation starts the job, the node checks avideo_status every few seconds, then pulls the bytes with avideo_content and hands you a ComfyUI VIDEO. Google's inline output arrives as base64, so nothing needs downloading.
Two exceptions. Omni Flash isn't polling at all - it's a single Interactions API request, so the progress bar just ticks up against elapsed time versus your timeout. And Gemini's model list is fetched live, filtered to models Google says still support video generation, falling back to a built-in list if that call fails. New Veo releases show up without a pack update, but only after a restart with the key set.
The roster, then: Veo and Omni Flash on Gemini, three sora-2 variants on OpenAI and Azure, and gen3a_turbo, gen4_turbo, gen4_aleph on Runway. Only Gemini does image-to-video.
The fields that matter
prompt is a multiline string, and it's required even when animating a reference image - the prompt is what tells the model how to move it.
source is a dynamic combo that drives everything else:
source: text- text-to-video. Revealsprovider, thenmodel, then settings.source: image- image-to-video. Provider listsgeminionly, andreference_imageappears.
The settings are the real parameters: size (aspect ratio), resolution, seconds. Veo adds person_generation and an optional negative_prompt; Runway adds seed (leave it at -1). Omni Flash takes just size, resolution and seconds - its API has no person control or negative prompt.
reference_image is an ordinary IMAGE socket: a Load Image node, or any node's output, including an image generated earlier in the same graph. It's optional at graph level but image-to-video fails at runtime if it's empty. Veo takes one image and errors clearly if handed a batch; Omni Flash accepts a batch (build one with Batch Images) and sends each frame as its own reference, in order. Veo's image-to-video person_generation only offers allow_adult - Google restricts generation to adults when a reference photo is supplied.
Three optional inputs: api_key (leave it blank), poll_interval (default 10s between status checks) and timeout (default 600s). The single output is VIDEO - into a Save Video node to land the file in output/.
Install
Via ComfyUI Manager, search ComfyUI_ExternalAPI. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/andy-ratsirarson/ComfyUI_ExternalAPI.git
cd ComfyUI_ExternalAPI
pip install -r requirements.txt
Restart afterward. Dependencies are litellm==1.100.0 and google-genai==1.47.0 - no weights, no CUDA, nothing heavy. Keys go in the environment that launches ComfyUI, then a restart: GEMINI_API_KEY (or GOOGLE_API_KEY), OPENAI_API_KEY, Azure's AZURE_API_KEY plus AZURE_API_BASE, or RUNWAYML_API_SECRET.
Where people get burned
timeout is a real 10-minute wall. On a 4K or high-res job, queueing plus generation can exceed the 600s default, so you'll get a timeout even though the job was fine. Raise it before blaming the node - and leave poll_interval alone.
The duration dropdown is a hint, not a promise. Gemini's 1080p and 4K output is locked to 8 seconds by Google, not by this node. Sora's 12-second ceiling is the author's conservative guess, not a published limit. Runway's turbo models take 5 or 10 and nothing in between.
Safety refusals are the provider's. This pack rewrites raw provider errors into plain English and specifically calls out content-safety rejections, advising you to rephrase and re-run. Nice error handling - but it can't generate what Google or OpenAI won't, and there's no local workaround.
Cost is per call, and video is where it gets expensive. A 4K Veo second, a 10-second 1080p clip - billed individually, and a few iterations adds up. That's the "subscription lock" objection, and it isn't wrong.
And the important one. This node is designed to hold a credential field named api_key, and anything you type there is saved into the workflow JSON and into output file metadata. Leave it blank; use the environment variable. Read the source before you key it up - a node that calls the internet with your key is exactly the shape that's been weaponized in this ecosystem before, and this pack has no community track record either way.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Text description of the video to generate. | |
| source | COMBO | Generation source: a text prompt alone, or a text prompt plus a reference image. | |
| api_keyopt | STRING | Overrides the provider's standard env var (e.g. GEMINI_API_KEY, OPENAI_API_KEY) when set. Warning: unlike an env var, this value is saved into the workflow JSON and into output file metadata. Prefer leaving this blank and setting the env var on the ComfyUI server instead. | |
| poll_intervalopt | FLOAT | 10.00 | Seconds between status checks while the video is generating. |
| timeoutopt | FLOAT | 600.00 | Maximum seconds to wait for generation before giving up. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VIDEO | VIDEO | — |