job_id immediately; processing is asynchronous, so you poll for status and then download the result.
FFmpeg jobs require a paid plan. An account with no active plan has 0 FFmpeg minutes. Activate Starter or higher to unlock the feature.
How a job works
1
Submit
POST to
/v1/ffmpeg/jobs with one or more source URLs and an FFmpeg command. The API validates the command, reserves quota, and queues the job. You receive a job_id.2
Poll
GET
/v1/ffmpeg/jobs/:id until status is finished.3
Download
GET
/v1/ffmpeg/jobs/:id/result to stream the processed file.Submit a job
Request body
Response
Poll status
Response
duration_sec is null until the job finishes; it is populated with the actual output duration once complete.
Download the result
Oncestatus is finished, stream the output file:
Content-Disposition: attachment. Pipe it to a file or buffer it in memory.
Command rules
Thefull_command field must satisfy all of the following rules. Requests that fail validation return 400 invalid_request before any quota is consumed.
Newlines in the command are converted to spaces automatically, so you can paste multi-line commands directly.
Allowed output extensions
output_extension must be one of the following values (without a leading dot):
Any other value returns
400 invalid_request.
Quota and billing
FFmpeg usage is measured in FFmpeg minutes. In v1, every job costs a flat 1 minute, regardless of the actual output duration. The quota is reserved at submit time and refunded automatically if the job fails to queue. Monthly limits by plan. The allowance is account-wide — it is not multiplied by the number of profiles, and all your brands draw from the same pool:
When you exhaust your monthly allowance, the API returns
429 quota_exceeded. Your allowance resets on the same day of the month your plan was activated (Vietnam time, UTC+7) — not on the 1st. Usage reports the exact start and renewal date of your current cycle.
Authentication and rate limits
All FFmpeg endpoints use the same API-key Bearer authentication as the rest of MADIAD Hub — see Authentication. The rate limit is 120 requests per minute per account across all FFmpeg endpoints. Exceeding this returns429 with a Retry-After header indicating how long to wait.
Job ownership
Jobs are private to the account that created them. Polling or downloading a job that belongs to another account returns404 not_found — there is no cross-account access.

