Sora Video-To-Video
Edit an existing clip through the API, quirks included
- job_id
- status
- result
SoraVideoToVideo is the editing sibling in the comfyui-sora-node pack. You hand it an existing video plus a prompt, it sends both to a Sora-compatible API, and you get back a clip that's been extended, edited, inpainted, or restyled - depending on the operation you pick. Like the other two nodes in this pack, nothing runs locally: it's a thin API client, not a model. No weights, no VRAM, and a hard requirement for an API key.
The pitch is basically "stop re-rolling whole clips." Video-to-video is how you fix one awkward moment instead of regenerating a five-second take and hoping. The reality is more qualified: this node is the most awkward of the three, and one design decision makes it a particular trap for people used to how ComfyUI wires things up.
The one big quirk
video is a STRING input - a file path or a base64 blob - not a ComfyUI video object. You can't drag a wire from a load-video node into it. The value has to be a path on the machine running ComfyUI (.mp4, .mov, .avi, .webm are handled) or a base64-encoded string pasted in. If you're used to video nodes connecting to everything, this will trip you up on the first attempt. It's the single most important thing to know before you build a workflow around it.
Also worth lowering expectations on: the inpaint operation is sent to the API as just a flag - there is no mask input on this node. Whether anything actually gets inpainted is entirely up to your backend. The README lists it as a feature, but the node itself gives the server nothing to work with beyond the video and the prompt. Treat inpaint as "ask the backend nicely," not a real mask-driven operation.
How it works
Same machinery as its siblings - a pure-stdlib urllib client, no requests, no torch, no requirements.txt. It reads the video file, uploads it as multipart form-data to base_url + endpoint (defaults https://api.openai.com/v1/sora and /videos) alongside a JSON payload with your prompt and settings, then polls the job until it reports succeeded and optionally downloads the result to download_path as <job_id>.mp4.
The inputs that matter
video(required) - a file path or base64 string, as covered above.prompt(required) - what you want done to the video. Default:"Extend this video with smooth continuation."operation- the dropdown that matters most:extend(default),edit,inpaint,style_transfer.extension_seconds(5) - only added to the request whenoperationisextend, so that's the one to bump for longer continuations.duration_seconds,aspect_ratio,fps,guidance_scale- the usual generation knobs, shared with the rest of the pack.api_key- setSORA_API_KEYorOPENAI_API_KEYin the environment; the field is checked first but stores your key in plaintext in the workflow.max_wait_secondsanddownload_path- same two gotchas as always.
Outputs are three strings: job_id, status, and result (a JSON blob with the job id, status, downloaded file path, and raw API response). No preview - set download_path and open the file.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/maxczc/comfyui-sora-node sora
Then fully restart ComfyUI - the README stresses a complete server restart, not a browser refresh. ComfyUI Manager can install it if you search the pack title. No model downloads, no mandatory dependencies; Pillow and numpy are optional and only matter for the image-handling node.
Where people get burned
- Feeding it a video. Expecting a wire-in connection is the classic failure. Use a file path the ComfyUI machine can actually read, or a base64 string.
- Timeout. Video is the slowest job type in this pack and the default
max_wait_secondsof 120 is tight. ATimeoutErrormeans bump the cap, not that the job failed. - No key. Same error as the rest of the pack:
Provide a Sora API key via the node input or SORA_API_KEY/OPENAI_API_KEY env vars. - Expecting real inpaint masks. There's no mask input. If masking matters, you need a different tool entirely.
It's a functional, anonymous little pack - clean stdlib code, no dependency drama - and this node is its least polished member. If you just need "extend this clip by five seconds" through a Sora backend, it works. If you want genuine video editing control, keep looking.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| video | STRING | — | |
| prompt | STRING | Extend this video with smooth continuation. | — |
| api_keyopt | STRING | — | |
| negative_promptopt | STRING | — | |
| operationopt | COMBO | extend | 4 options: extend, edit, inpaint, style_transfer |
| extension_secondsopt | FLOAT | 5.0 | — |
| duration_secondsopt | FLOAT | 5.0 | — |
| aspect_ratioopt | STRING | 16:9 | — |
| seedopt | STRING | — | |
| fpsopt | INT | 24 | — |
| guidance_scaleopt | FLOAT | 7.5 | — |
| base_urlopt | STRING | https://api.openai.com/v1/sora | — |
| endpointopt | STRING | /videos | — |
| metadataopt | STRING | — | |
| webhook_urlopt | STRING | — | |
| wait_for_resultopt | BOOLEAN | true | — |
| poll_intervalopt | FLOAT | 3.00 | — |
| max_wait_secondsopt | FLOAT | 120.00 | — |
| download_pathopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| job_id | STRING | — |
| status | STRING | — |
| result | STRING | — |