Skip to main content
Every episode has two or three moments worth posting, and a transcript with timestamps already says where they are. This pipeline lets a model pick them as whole segments, cuts them with ffmpeg, writes the captions from the same timestamps, and puts each clip over cover art that moves. One episode costs about a third of a dollar, almost all of it the four seconds of generated video; the transcript, the picks and the voice are cents.

Build it in your project

Paste this line into your agent (Claude Code, Codex, Cursor, OpenCode, Cline). It sets up your key, then builds the pipeline in your project:

The code

One file per language. Both read RUNCRATE_API_KEY from the environment; nothing secret is in the code.

What the proof run cost

The Python file, run on a 72-second two-host episode (voiced with Kokoro for the test). Measured on 2026-10-23 against api.runcrate.ai; costs are what the account was billed, read from each response’s X-LLM-Cost header or usage.cost. The TypeScript file on the same episode: $0.3291 in 173 s. It picked the same two moments (22.4 s and 23.1 s long).

Scale it

  • A season: run one episode per job with --count or --params (one env per episode), or keep it on your machine and fan out with a thread pool; the API calls are the work, not your CPU.
  • Cost is set by the video: one 4-second background per episode, reused under every clip from it. Two backgrounds per episode doubles the bill; ten clips from one background costs the same as two.
  • New episodes: point a webhook from your host at a small endpoint that runs this, or a schedule that checks the feed nightly.
  • Cap it: a spend limit on the key stops a runaway loop at your number.

Gotchas found in the proof run

  • Use whisper-large-v3-turbo, not Voxtral, when you need timestamps: Voxtral’s verbose_json came back with an empty segments list.
  • Homebrew’s ffmpeg has no subtitles or drawtext filter (no libass or freetype). The script checks ffmpeg -filters: with the filter it burns the captions in, without it it muxes a caption track and writes the .srt next to the clip (TikTok, YouTube and LinkedIn take the file as an upload).
  • Ask for picks as segment numbers, not seconds: the model then cannot cut mid-word.
  • The free tier is per minute as well as per day: about 20 requests a minute. One episode is three free calls, so it never hit it.