POST
/v1/tools/make_looppricedLoop a clip
Makes a loop of a video from its own frames that plays on repeat with no jump, for a background or a post. It finds where the picture and its motion come back to the start and keeps the frames between, without sound. A video whose movement never comes back, like something crossing the picture one way, is refused.
Takes src (file). Returns video.
$0.01 a second of video, up to 60 seconds.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
src | string | Required | A file_id from create_upload, accepting video/*, up to 512 MB. 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. Without one, animate_image (Animate an image) makes one, or generate_video (Generate a video) makes one: run it first and pass its job_id here. |
Call it
Request
curl -X POST https://app.scrub.app/v1/tools/make_loop \
-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.