Scrub API
POST/v1/tools/generate_videopriced

Generate a video

Creates a short video clip with sound from a description (text to video), 4, 6 or 8 seconds, wide or upright, 720p or 1080p, as an MP4. Reference images, optional, keep a person, a product, a place or a look from images you give in the clip.

Takes prompt (text), references (a list of files, up to 3, optional, with model recommended or Kling 4.0 or Seedance 2.5 or Seedance 2.0 Fast, with seconds 8). Returns video (the clip, an MP4 with sound, at 24 frames a second).

$0.21 to $1.14 a second of video: at 720p Recommended $0.21, Kling 4.0 $0.32, Kling 3.0 $0.26, Seedance 2.5 $0.47, Seedance 2.0 Fast $0.24; at 1080p Recommended $0.31, Kling 4.0 $0.47, Kling 3.0 $0.34, Seedance 2.5 $1.14, up to 8 seconds.

Fields

FieldTypeDefaultWhat it is
referencesarrayNoneA list: A 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. All of them are one job.
promptstringRequiredWhat happens, how it looks and what is heard, in a sentence or a few; English works best. Describe how a place or thing looks rather than naming it, since a named landmark is drawn as the model imagines it.
modelone ofrecommendedThe model it is made with. Recommended is Scrub's pick, Gemini Omni 1.1 Flash; the others by name, each at its own price.
recommendedKling 4.0Kling 3.0Seedance 2.5Seedance 2.0 Fast
aspect_ratioone of16:9Its aspect ratio, width to height.
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/generate_video \
  -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.