Why two jobs when one will do
The straightforward approach to downloading and processing a video is: download it first, then run FFmpeg on the file. Two API calls, two command IDs to track, a temporary file sitting somewhere between the two steps.
/api/v1/run-ytdlp-command does both in one request. You send a URL and an FFmpeg command; the API downloads the video, pipes it through FFmpeg, and gives you the processed output. One command_id to poll.
The request format
A few things about the format:
input_urlskeys must start within_ffmpeg_commanduses{{double_braces}}for placeholdersoutput_filesis required whenffmpeg_commandis set — it maps each output key to a filename
If you leave out ffmpeg_command, it behaves like the plain /api/v1/ytdlp-download endpoint and returns the raw downloaded file.
Recipes
Extract audio as MP3
The most common use case — pull the audio track from a YouTube video:
Crop to 9:16 for vertical video
Download a landscape YouTube video and crop it to center 9:16 at 1080×1920:
Trim to a specific segment
Extract 45 seconds starting at 1:30:
-c copy skips re-encoding (fast, but cuts on keyframe boundaries). Drop it if you need frame-accurate cuts.
Resize and compress
Download a TikTok video and re-encode at 720p:
scale=720:-2 sets width to 720 and picks a height divisible by 2 to keep the aspect ratio.
Thumbnail at a timestamp
Grab a frame at 30 seconds:
Polling
Same as any other RenderIO command:
On success:
Status values: QUEUED, PROCESSING, SUCCESS, FAILED.
Node.js
Python
When to use this vs. two separate calls
Use the combined endpoint when the processing step is fixed — you know before submitting that you'll always extract audio, or always crop to 9:16. It keeps everything in one job.
Use separate calls when the processing step depends on what you learn from the download — inspecting duration, resolution, or format before deciding how to transcode. The plain ytdlp-download gives you the file first; you can then submit an FFmpeg command as a second step with the result.
Related guides
yt-dlp API overview — quickstart and platform support
Node.js integration — complete examples with polling and error handling
Python integration — sync and async client
FFmpeg API guide — for files you already have