Scrub API
POST/v1/tools/add_captionspriced

Caption a video

Captions a video from the video alone, as subtitles burned into the picture, at most two lines and seven seconds each. Give a transcription to skip transcribing.

Takes src (file), transcript (file, optional). Returns video, preview, edl (the captions as drawn, each with its words, times, place and style, and the source they were drawn on). One job: transcribing, then making captions, then burning in captions. Given transcript, it skips transcribing.

$0.10 a minute of video + $0.15 per 10 minutes of audio, up to 60 minutes. quote gives its exact price.

Afterwards, change the result with adjust on the job of the step that made it, listed in the result.

Fields

FieldTypeDefaultWhat it is
srcstringRequiredA file_id from create_upload, accepting video/*, up to 2 GB. 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.
transcriptstringNoneA file_id from create_upload, accepting application/vnd.scrub.transcript+json, application/json, up to 16 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.
positionone oflower_thirdWhere the captions sit.
lower_thirdcentretop_left
styleone ofcleanHow the captions look. clean: White, heavy, a few words at a time. Each word lights up as it is said. pill: The word being said sits in a white pill, in black. box: The phrase on a dark rounded box, for busy footage. bold: Heavy words that pop in as they are said; the word being said grows. subtitles: One or two full lines, smaller, without movement: for talks and wide videos.
cleanpillboxboldsubtitles
fontone ofInter TightThe font the captions are set in. Inter Tight: Tight and even; every caption style's face. Inter: The plainest, most legible sans; explainers and data. Manrope: Calm, geometric and modern. Hanken Grotesk: Soft, open grotesque; friendly captions that stay easy to read. Archivo: Sturdy grotesque with real weight; news and how-tos. Montserrat: The face most short-form captions are set in. Poppins: Round geometric sans; friendly brands and lifestyle. Figtree: Clean and warm, a little softer than Inter. Bricolage Grotesque: Quirky editorial sans. Rubik: Slightly rounded corners; playful but tidy. Bebas Neue: Tall capitals; titles, numbers and sport. Anton: Heavy, narrow capitals; the loudest hook text. Oswald: Condensed, with weights; lists and labels. League Gothic: Classic condensed gothic; posters and film titles. Fraunces: Soft, old-style serif; warm stories. Playfair Display: High-contrast serif; elegant titles. Instrument Serif: Narrow editorial serif. DM Serif Display: Bold display serif; quotes and headlines. PT Serif: Classic text serif with italics; reports, history and quotes. Caveat: Quick handwriting; notes and asides. Bangers: Comic-book capitals; reactions and gaming. Luckiest Guy: Fat cartoon capitals; kids, gaming and hooks. JetBrains Mono: Monospace; code, terminals and numbers that line up.
Inter TightInterManropeHanken GroteskArchivoMontserratPoppinsFigtreeBricolage GrotesqueRubikBebas NeueAntonOswaldLeague GothicFrauncesPlayfair DisplayInstrument SerifDM Serif DisplayPT SerifCaveatBangersLuckiest GuyJetBrains Mono
sizenumber72The captions' type size, in pixels on a frame whose shorter side is 1080; larger shows fewer words at a time.
rowsnumber1How many lines a caption runs to; as many words show at once as fit.
caseone ofas_saidCapital letters as said, all capitals, or all lower case.
as_saidcapitalslower_case
weightone ofstyleHow heavy its letters are; the nearest weight its font has is drawn. style: its style's own
style100200300400500600700800900
aheadone ofstyleHow the words of a caption not said yet look, in a style that shows a caption's words together. style: as its style shows them faded: faint until each is said full: as clear as the word being said
stylefadedfull
inone ofstyleHow each caption comes in. style: the move its style has none: just there fade: comes up from nothing rise: lifts into place pop: springs up with a little overshoot
stylenonefaderisepop
outone offadeHow each caption goes as the next comes. fade: a quick fade as the next comes none: just gone
fadenone
colourstringnullThe words' colour. Left alone, the style's own.
highlightstringnullThe colour of the style's highlight, the pill the word being said sits in, the box behind the phrase, or the word being said, as the style has it. Left alone, the style's own; nothing in a style with no highlight.
alignone ofcentreWhere the words sit in their box. left: the words start at the left of their box centre: the words centred in their box right: the words end at the right of their box
leftcentreright
backgroundone ofstyleWhat is behind the words; as its style has it when left. style: its style's own none: nothing behind the words box: a rounded box round the phrase bar: a band the width of the caption's box
stylenoneboxbar
background_colourstring#111114The background's colour, when a box or a bar is chosen.
background_opacitynumber80How solid the background is, when a box or a bar is chosen.
edgeone ofstyleWhat is round each letter; as its style has it when left. style: its style's own none: nothing round the letters outline: a line round each letter shadow: a soft shadow under the words
stylenoneoutlineshadow
edge_colourstring#000000The outline's or the shadow's colour, when one is chosen.
boxobjectnullWhere the caption sits and the room its words wrap in: x and y its centre, width and height its size, as shares of the frame. Left out, the placement's own place. On the page it is dragged and its handles pulled; it snaps to the frame's safe lines.

Call it

Request

curl -X POST https://app.scrub.app/v1/tools/add_captions \
  -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.