Scrub API
POST/v1/tools/animate_imagepriced

Animate an image

Turns an image into a short video clip with sound (image to video): it starts on the image and moves as the words describe, 4, 6 or 8 seconds, wide or upright, 720p or 1080p, as an MP4. It can also end on the same image, so the clip plays on repeat with no jump.

Takes image (file). Returns video (the clip, an MP4 with sound, at 24 frames a second).

$0.21 a second of video, $0.31 at 1080p, up to 8 seconds.

Fields

FieldTypeDefaultWhat it is
imagestringRequiredA 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. Without one, draw_diagram (Draw a diagram) makes one, or generate_image (Generate an image) makes one: run it first and pass its job_id here.
promptstringRequiredWhat moves and how, and what is heard, in a sentence or a few; English works best.
end_on_imagebooleanfalseThe clip ends on the image it starts on, so it plays on repeat with no jump; only at 8 seconds. Movement has to come back round for that, like waves, a fire or birds circling, not something crossing the picture one way.
aspect_ratioone of16:9Its aspect ratio, width to height. An image of another shape is cut from the middle to fill it, with no bars.
16:99:16
secondsone of8How long it runs, in seconds.
468
resolutionone of720pIts resolution. 1080p only at 8 seconds.
720p1080p

Call it

Request

curl -X POST https://app.scrub.app/v1/tools/animate_image \
  -H "Authorization: Bearer $SCRUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"w/…/file_id","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.