AIManim
Turns a plain-language maths prompt into a narrated Manim animation through a plan, generate, validate and repair loop.
What it is
AIManim takes a plain-language maths question and produces a narrated explainer video. An LLM first plans the explanation as discrete scenes, then writes Manim code for each scene. Scenes that fail validation or rendering go back through regeneration and repair before anything is rendered, and finished scenes are stitched with FFmpeg.
The pipeline is plan → generate → validate → repair → render → stitch, and it is built so that one broken scene never sinks the whole video.
01
Repair loops, not retries
Invalid plans and unrenderable scenes trigger targeted regeneration and repair passes.
02
Adaptive length
--min-scenes, --max-scenes and --target-total-seconds turn the same prompt into a 20-second clip or a two-minute derivation.
03
Multi-provider
OpenRouter, OpenAI and Gemini, with credentials from the environment or the OS keyring and parallel code-generation workers.