Ryan Rochmanofenna

Generative Manim

A text prompt becomes a narrated math animation: an LLM writes a Manim scene, a sanitizer and pre-flight validator catch what it got wrong, and Manim renders the result to video.

Source on GitHub →

Runs
5
Total cost
57.4¢
Pipeline time
11m 59s
Video produced
8m 39s

These are recorded runs, not live generation — each one costs real API tokens and takes minutes. The logs and timestamps below are the real ones; only the waiting between events is compressed, so you don’t sit through 67 seconds of silent rendering.

Show how a bond's price moves inversely with its yield

Model
claude-opus-5
Cost
9.7¢
Pipeline
2m 23s
Attempts
1
Output
93s video
Resolution
854x480
Frames
5,581
Tokens out
3,509
+0.0s
  1. 6 events, 143.4s wall time

Visualize a Fourier series converging to a square wave

Model
claude-opus-5
Cost
8.8¢
Pipeline
1m 41s
Attempts
1
Output
92s video
Resolution
854x480
Frames
5,517
Tokens out
3,152
+0.0s
  1. 6 events, 101.0s wall time

Prove the Pythagorean theorem by rearranging four triangles

Model
claude-opus-5
Cost
16.6¢
Pipeline
2m 30s
Attempts
1
Output
97s video
Resolution
480x854
Frames
5,805
Tokens out
6,258
+0.0s
  1. 6 events, 150.2s wall time

Derive the Black-Scholes PDE step by step

Model
claude-opus-5
Cost
11.9¢
Pipeline
2m 54s
Attempts
1
Output
133s video
Resolution
854x480
Frames
7,994
Tokens out
4,404
+0.0s
  1. 6 events, 173.6s wall time

Show the central limit theorem by summing dice rolls

Model
claude-opus-5
Cost
10.4¢
Pipeline
2m 31s
Attempts
1
Output
104s video
Resolution
854x480
Frames
6,264
Tokens out
3,783
+0.0s
  1. 6 events, 151.1s wall time

What the stages do

code_generation
One call to Claude writes a complete Manim scene, narration included.
sanitize
Rewrites typographic characters the model emits — em dashes, curly quotes — that LaTeX refuses to compile.
validate
Parses the scene, checks the class exists, and rejects narration too long for the speech endpoint. Failures here are repaired before a render is paid for.
render
Manim renders frame by frame. A render that fails goes back to the model with the error attached; an outage is retried without one.
done
The MP4 is muxed for streaming and checked for size.