Scrub API
POST/v1/tools/make_a_looppriced

Make a loop

Makes a short video that loops: it plays on repeat with no jump, for a background or a post. From a few words, or from an image, which is the clip's first and last frame. The movement has to come back round, like waves, a fire, a flag in the wind or birds circling; something crossing the picture one way cannot loop. 8 seconds at most, without sound.

Takes image (file, optional). Returns video. One job: making the image, then filming, then finding the loop. Given image, it skips making the image.

$0.22 a second of video + $0.07 an image, up to 8 seconds. quote gives its exact price.

Fields

FieldTypeDefaultWhat it is
imagestringNoneA file_id from create_upload, accepting image/jpeg, image/png, image/webp, up to 20 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.
promptstringRequiredWhat is in the picture and what moves, in a sentence or a few, such as steam rising from a cup of coffee; English works best. With an image, what moves in it.
aspect_ratioone of16:9Its aspect ratio, width to height.
16:99:16

Call it

Request

curl -X POST https://app.scrub.app/v1/tools/make_a_loop \
  -H "Authorization: Bearer $SCRUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"…"}'

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.