← Work

LLM structured extraction / ElevenLabs voice cloning / Remotion Lambda

PlanReel

Upload a Medicare plan PDF and get a narrated, captioned 1080p video in the agent's own cloned voice. A language model extracts every benefit into a strict schema and writes the script, ElevenLabs speaks it, and Remotion renders it across 94 AWS Lambdas for under three cents.

  • LLM structured extraction
  • ElevenLabs voice cloning
  • Remotion Lambda
  • Next.js 15
  • BullMQ
  • Zod
  • Postgres
  • AWS
Role
Full-stack and AI engineer
Year
2026
per 1080p render, measured
$0.028
PlanReel slide editor showing a Medicare plan video as editable slides, with the AI pipeline from PDF to render above it

Medicare agents explain the same plan documents to client after client, one phone call at a time. PlanReel turns a plan's Summary of Benefits or Annual Notice of Change into a personalised video: that plan's real numbers, in the agent's own voice, ready in minutes.

The model drafts. The agent approves every word. Nothing reaches a client that a person hasn't read.

Where the AI is, and where it isn't

PlanReel AI video pipeline: a PDF flows through four idempotent jobs, extract, generate-script, synthesize-slide and render, to an MP4 and captionsPlanReel AI video pipeline: a PDF flows through four idempotent jobs, extract, generate-script, synthesize-slide and render, to an MP4 and captions

Four jobs on one queue. Each is idempotent, and each fails into an error a person can read.

  • Reading the document. The PDF goes to the model with a strict JSON schema generated from Zod. Money is never a float: every cost is integer cents plus the exact string the document printed, so the screen can be audited against the PDF line by line.
  • Writing the script. Eighth-grade reading level, no exclamation points, every number on screen spoken aloud, and nothing invented. Video endings are provided as data and used verbatim, because a real user needed the video to never say "call me".
  • Speaking it. ElevenLabs synthesises each slide in the agent's cloned voice and returns character-level timings. Those timings drive the captions and make each figure count up on screen at the moment it is spoken.
  • What it never does. It doesn't decide what a plan covers, it doesn't send anything to a client, and it doesn't put a number on screen that a human hasn't approved.

The engineering around the model

A 32-page plan once asked for 34,983 tokens against a 30,000 tokens-per-minute limit. Waiting can't fix a request that will never fit, so extraction splits the PDF into 12-page chunks, runs them in sequence inside one rate-limit window, halves any chunk that is still too big, and merges the results with page numbers intact.

One Zod schema in packages/core feeding the Remotion video components, the editor forms and the model's output schemaOne Zod schema in packages/core feeding the Remotion video components, the editor forms and the model's output schema

The renderer, the editor and the model read the same schema, so a field-name mismatch between them can't be written.

Rendering on one small ARM box two frames at a time compared with 94 Remotion Lambdas rendering in 23 seconds for $0.028Rendering on one small ARM box two frames at a time compared with 94 Remotion Lambdas rendering in 23 seconds for $0.028

Measured on a real render: 94 concurrent Lambdas, 23 seconds, $0.028, 15 MB of 1080p H.264.

The product

PlanReel render step with a final check asking the agent to approve every slide and word before the video can render

Nothing renders until the agent has approved every slide. Above, the editor: click any text on a slide and edit it in place.

PlanReel ready screen with the finished video, MP4 and caption downloads, and an email blurb for clients

The finished video, an SRT caption file, and an email blurb that leaves the phone number out on purpose.

The full engineering story, including the schema that was valid but rejected and the video that kept stopping, is in Engineering PlanReel.