POST
/v1/tools/compress_videopricedCompress a video
Makes a video file smaller to send or upload: looking the same, much smaller with no difference most people notice, or as small as it goes.
Takes src (file). Returns video.
$0.02 a minute of video, up to 30 minutes.
Afterwards, change quality with adjust; quote_adjustment prices the change.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
src | string | Required | A file_id from create_upload, accepting video/*, up to 2 GB. Get one with create_upload. Or the job_id of a finished job that made a file of this kind: that file is used. Pass the job_id rather than retyping its result. Or a file_id (cf_…) from list_computers: a file on the person’s computer, run there by the Scrub app while it is open, at the price there. |
quality | one of | balanced | How much to keep. Looks the same (looks_the_same) is hard to tell from the original; Balanced (balanced) is much smaller, with no difference most people notice; Smallest (smallest) is smallest, a little softer.looks_the_samebalancedsmallest |
Call it
Request
curl -X POST https://app.scrub.app/v1/tools/compress_video \
-H "Authorization: Bearer $SCRUB_KEY" \
-H "Content-Type: application/json" \
-d '{"src":"w/…/file_id"}'Answer
{
"ok": true,
"result": {
"job_id": "job_…",
"status": "running",
"price_usd": "$…"
}
}It starts at once and answers running. Ask job_status with the job_id for its result. quote gives its price first, free.
Every call can also answer an error: what comes back. Try it with your key from Account.