Scrub API
POST/v1/tools/write_scriptpriced

Draft a video script

Drafts a narrated video, such as a short with a voiceover over pictures, from an idea, or divides a script of up to an hour into scenes, every word kept, its labels and directions never said: what is said, the words on screen, the images and the music. The skill make-narrated-video makes the video from it.

Takes idea (text). Returns timeline (the draft as a timeline, scene by scene, each with what is said and the words on screen, and its images, each from a moment of the line with what it shows, and the music it asks for, in words, to change before it is voiced and made).

$0.05 a draft.

Fields

FieldTypeDefaultWhat it is
ideastringRequiredWhat the video is about, in a sentence or a few; or a script of up to an hour, whose words are kept as they are, divided into scenes, in its own language. Music it asks for is described in the draft.
secondsnumber30About how long a video drafted from an idea runs, in seconds. A script given keeps its own length, whatever this says.
picturesone ofimagesHow its images are described. Images, as a picture; videos, as a shot of at most 8 seconds, what moves, how the camera moves and the sound of the place, for a clip to be made from.
imagesvideos
brand_kitstringNoneA Brand Kit's id (kit_…) from list_brand_kits: its look and settings fill what this call leaves out, and what the call gives wins. Read once when the job starts.

Call it

Request

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

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.