Generative Manim: turning text prompts into Manim animation code
🎨 GPT for video generation ⚡️
At a glance
- What is it?
- Generative Manim is a Python suite that asks an LLM to write Manim scenes from a plain text prompt, then renders them. The repository now points most users at Animo, a desktop app, while the API and the legacy Streamlit app remain in the tree.
- Who is it for?
- Adopt Generative Manim if you already write Manim and want an LLM to draft the first version of a scene, or if you want a self-hosted Flask API behind your own prompt UI. Do not adopt it if you expect a finished video with no code review: the output is Python that has to render, and Manim failures are common enough that the API container sets a 120 second gunicorn timeout.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 19 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The problem Generative Manim targets
Manim produces precise mathematical animation, but writing a scene means knowing the object model, the animation classes and the timing system before anything appears on screen. Generative Manim takes the position that the prompt is the interface. A user describes the animation in English, an LLM writes the Manim Python, and the renderer turns that code into a video. The README frames the goal as letting people create animations "Regardless of their programming or video editing skills."
The audience is narrower than that sentence suggests. The repository is a Python project with a Flask API, a Dockerfile and a legacy Streamlit front end, so the person running it is a developer or an operator. The person typing the prompt can be anyone, but someone still has to hold an API key, start a process and watch the render. The README also states that Animo, a desktop application, is "the natural evolution of Generative Manim," which tells you where the maintainers expect most non-developers to end up.
How the model layer turns a prompt into a scene
The README describes a model as "a way to convert text to code, that can later be rendered in a video." That is the whole architecture in one line: the model is a code generator, and Manim is the renderer. The repository ships a table of model options rather than a single hardcoded provider. There are OpenAI entries (GPT-4o, o1-mini, several GPT-3.5 fine-tunes), Anthropic entries (Claude Sonnet 3 through Sonnet 5, Opus 4.7 and 4.8, Haiku 4.5), a Gemini 2.5 Flash entry accessed through the google-genai SDK, hosted open-weight models through Featherless, and a LiteLLM passthrough that "Accepts any model string supported by LiteLLM."
That passthrough is the most interesting design decision in the table. Instead of writing an adapter per provider, the project can hand an arbitrary model string to LiteLLM and let that library route the call. The cost is that behaviour becomes provider-dependent: prompt formatting, token limits and error shapes all vary underneath the same interface. The README does not document a retry policy, a fallback chain or a validation step between generation and rendering. If the model emits code that imports something Manim does not have, nothing in the described flow catches it before the renderer does.
Installing the API and generating a first scene
The repository ships a Dockerfile that builds the whole runtime. It starts from python:3.11-slim, installs build-essential, ffmpeg, libcairo2-dev, libpango1.0-dev and pkg-config, then installs api/requirements.txt. Those system packages are the ones Manim needs to draw and encode; without cairo, pango and ffmpeg the render step fails. The image creates a non-root appuser with uid 1000 and switches to it before the entrypoint.
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ffmpeg \
libcairo2-dev \
libpango1.0-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
COPY api/requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY api/ api/The container sets FLASK_APP to api.run and FLASK_ENV to production, exposes port 8080, and starts gunicorn with two workers and a 120 second timeout. The Dockerfile ends with the command below, which is what the image runs by default.
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "2", "--timeout", "120", "api.run:app"]If you prefer to run the code directly instead of in a container, the pyproject.toml pins the Python range and the dependency set for the older Streamlit path.
python = ">=3.9.8,<3.11"
manim = "^0.15.1"
streamlit = "^1.14.0"
protobuf = "^3.20.0"
openai = "^0.27.2"Note the constraint before you install anything: pyproject.toml declares python = ">=3.9.8,<3.11", while the Dockerfile uses python:3.11-slim. Those two files describe different environments, and the Dockerfile is the one that also installs the Cairo and Pango system libraries. Treat the container as the supported path and the bare dependency list as a convenience for the Streamlit app.
Where the generated-code approach breaks down
The failure mode is structural, not incidental. The system's output is source code that must execute. An LLM that produces plausible-looking Manim that references a renamed class, misorders a constructor argument or calls a method that does not exist on that object has produced a failed render, not a slightly wrong video. There is no partial credit.
The 120 second gunicorn timeout in the Dockerfile is a useful signal about expected latency. Rendering a Manim scene is not instant, and the API holds a request open for the duration. Two workers means two concurrent renders before requests queue. A prompt that produces a long or complex scene can hit that ceiling. The README does not describe a job queue, a polling endpoint or a webhook, so the described flow appears synchronous.
There is also a cost shape worth naming. Every generation is a model call, and the model table spans cheap tiers and frontier tiers. Iterating on a prompt means paying for each attempt, and a failed render costs the same as a successful one. The README makes no claim about how often the first attempt renders cleanly, and none should be assumed. If you need a deterministic pipeline that produces the same output from the same input, a code-generating model is the wrong tool; write the Manim scene yourself.
Animo, Streamlit and the rest of the repository
The tree holds more than one product. The streamlit/ directory is described in the README as the "First LLM exploration of LLMs and Animation," and the pyproject.toml still carries the name streamlit-manim at version 0.1.0 with an openai dependency pinned at ^0.27.2. That pin is far behind current OpenAI client versions, so the legacy path is best read as a historical artifact rather than a maintained surface. The api/ directory is the current server. The animo/ directory and ANIMO.md belong to the desktop application line, and the v4.0.0 release is titled "Animo v4.0.0" while the earlier tags read GenerativeManim and Generative Manim.
The practical difference between the Streamlit app and the API is where the work happens. Streamlit runs a local interactive session with the render in the same process. The API is a gunicorn-served HTTP service, which is what you would put behind a web front end or call from another service. The README links a cloud deployment guide for Render or another Docker-based platform, so the intended deployment for the API is a container host, not a laptop. For a single user experimenting locally, the container is more machinery than the task requires; for anything shared, it is the only path the repository actually documents.
Maintenance, licence and upgrade cost
The repository is not archived, and the last push was on 2026-08-27, so work is recent. The release history is uneven in a way worth noting before you plan around it: v1.0.0 and v2.0.0 landed one day apart in March 2023, then nothing until v4.0.0 in July 2026. A three-year gap between major tags means the project was dormant for a long stretch and then reoriented around the Animo desktop application. If you adopted the 2023 Streamlit version, the upgrade path now runs through a different product line.
The licence is Apache-2.0, which permits commercial use and modification and includes an explicit patent grant. That is permissive, and it does not obligate you to publish your own changes. What Apache-2.0 does not do is grant rights to the model providers' terms: your OpenAI, Anthropic or Google usage is governed by your own agreement with them, and the repository's licence says nothing about that. This is not legal advice; check the provider terms that apply to your account.
Upgrade cost concentrates in two places. The pyproject constraint of python = ">=3.9.8,<3.11" will block newer interpreters on the Streamlit path, and the openai = "^0.27.2" pin will conflict with modern client libraries. The API path avoids both by pinning its own requirements inside the container, which is another reason to treat Docker as the supported route.
Editorial conclusion
Adopt Generative Manim if you already write Manim and want an LLM to draft the first version of a scene, or if you want a self-hosted Flask API behind your own prompt UI. Do not adopt it if you expect a finished video with no code review: the output is Python that has to render, and Manim failures are common enough that the API container sets a 120 second gunicorn timeout. Before committing, check whether your Python version satisfies the pyproject constraint of >=3.9.8,<3.11, confirm which model string your provider accepts, and decide whether the desktop Animo app is a better fit than running the API yourself.
Frequently asked questions
What is Generative Manim and what does it do?
It is a suite of tools that creates Manim videos from text using LLMs such as GPT-4o or Claude. A model converts the prompt into Manim Python code, and Manim renders that code into an animation.
Which models can Generative Manim use?
The README lists OpenAI models including GPT-4o and o1-mini, Anthropic models from Claude Sonnet 3 through Opus 4.8, Gemini 2.5 Flash via the google-genai SDK, hosted open-weight models through Featherless, and a LiteLLM passthrough that accepts any model string LiteLLM supports.
How do I install and run Generative Manim?
The repository provides a Dockerfile that builds a Python 3.11 image with the Cairo, Pango and ffmpeg system dependencies Manim needs. It exposes port 8080 and starts gunicorn with two workers and a 120 second timeout.
Do I need to know Manim to use Generative Manim?
The README states the project aims to let people create animations regardless of their programming or video editing skills. In practice the output is Python code that has to render, so someone still needs to run the API and deal with failed renders.
Is Generative Manim the same as Animo?
No. The README describes Animo as a lightweight desktop application and the natural evolution of Generative Manim, with local rendering and no server or Docker container to run. The v4.0.0 release is titled Animo v4.0.0.
What Python version does Generative Manim require?
The pyproject.toml declares python = ">=3.9.8,<3.11" for the Streamlit path, while the Dockerfile uses python:3.11-slim. Those two files describe different environments.
Community notes