1. NewAPI Submit Video Task
The ComfyUI node that turns API credits into a Sora video
- image
- image_2
- image_3
- report
Sora and Veo are API-only. You can't download the weights, so the only way to get one of those clips into your ComfyUI workflow is to pay a relay and call it over HTTP. NewApiSubmitVideoTask is the node that writes that check. It's the first of three nodes in the xiaohuangzhengbang/maomao pack that turn a NewAPI-style video relay into an async three-step pipeline: submit, poll, download.
Why bother? Because the alternative is running Wan locally and waiting ten minutes per clip on your own GPU. If your brief is Sora-quality motion or Veo's native audio, the closed models are the only ones that do it - the KB's closed-source-models doc is blunt that Veo 3.1's native audio still has no open-source equivalent. This pack is how you use those models without leaving ComfyUI: the finished video lands back in your normal graph.
How it works
You give it a Bearer API key (the one you get when you buy relay access), a model, and a prompt, and it POSTs to {relay}/v1/videos. The interesting part is image-to-video: wire any of the optional image, image_2, or image_3 inputs and the node uploads each one to tmpfiles.org first, then sends the public URLs to the provider. Yes, your frames sit on a public file host for a while - fine for test clips, worth knowing before you feed it something private.
Submission is async, so the node doesn't wait for the video. It saves the job - including the full request payload - to newapi_video_tasks.json in the pack folder, and returns a report string.
The inputs that matter
- api_key - the relay key. Leave it blank and the node just returns
缺少 API Key("missing API key") and does nothing. - model -
sora-2, orveo-8s-image-to-video, which the pack maps togemini-veo-3.1-generate-preview-ref-8s(Google Veo 3.1, image-to-video, 8 seconds). - prompt - a multiline box; the default is a fairly bland "A subtle presenting gesture in front of an office building."
- seconds -
auto,12,16,20. The catch: those choices only apply to sora-2. Veo is fixed at 8 seconds, andautosilently resolves to 12 for sora-2. Ask for 20 seconds on a Veo job and it quietly downgrades to 8 - the report mentions it, but it's easy to miss. - aspect_ratio / size - both dropdowns;
sizeset toautoderives from the aspect ratio (16:9→1280x720, 9:16→720x1280, 1:1→1024x1024). - custom_model (optional) - a raw model name that overrides the dropdown. The author's own test log shows the relay also exposes other
gemini-veo-3.1-generate-preview-*variants, so this is the escape hatch for models that never got a button.
There's also generate_audio, negative_prompt, retry_on_transient_failure, and max_retries (0–20, default 3). The last two get stored with the task and only really matter later, in the query node.
Output
Just one: report, a STRING. Treat it as a human-readable status line, not data - it's [sora-2] 提交成功:<task-id> plus notes, and everything comes back in Chinese because the author writes in Chinese (the repo's docs are thin English, the messages are not). The task id itself lives in the JSON file, which is what the next two nodes read.
Install
Via ComfyUI Manager, search maomao (the pack title) and install, then restart ComfyUI. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/xiaohuangzhengbang/maomao
Restart. There's no requirements.txt and no model download - the pack only uses requests, numpy, and Pillow, all already in ComfyUI's environment. All the heavy compute happens on the relay's servers, which is why the whole pack is one small Python file.
The trap
All three nodes in this pack return NaN from IS_CHANGED (the always-rerun trick documented in the node-plumbing doc), meaning they execute on every queue run, cache be damned. With this node, that's a fresh paid submission every time you hit Queue - twice if you queue twice. Don't leave it wired into a workflow you re-run while iterating on a prompt; treat it as "click this when you actually want a clip." And given the relay's track record - the pack's own test log shows upstream video completion failing under load - set the query node's retry machinery up before you start spending.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| model | COMBO | sora-2 | 2 options: sora-2, veo-8s-image-to-video |
| prompt | STRING | A subtle presenting gesture in front of an office building. | — |
| aspect_ratio | COMBO | 9:16 | 3 options: 16:9, 9:16, 1:1 |
| seconds | COMBO | auto | 4 options: auto, 12, 16, 20 |
| size | COMBO | auto | 4 options: auto, 1280x720, 720x1280, 1024x1024 |
| generate_audio | BOOLEAN | false | — |
| negative_prompt | STRING | — | |
| retry_on_transient_failure | BOOLEAN | true | — |
| max_retries | INT | 30–20 | — |
| custom_modelopt | STRING | — | |
| imageopt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| report | STRING | — |