Manim.Ai.demo.mp4
Manim-AI is an innovative platform that transforms natural language prompts into captivating mathematical animations using Manim. By integrating AI models like Claude, it empowers users to generate complex animations without writing a single line of code.
- Natural Language Interface: Describe the animation you envision, and Manim-AI brings it to life.
- AI-Powered Code Generation: Utilizes Claude to convert textual prompts into executable Manim scripts.
- Automated Rendering: Seamlessly processes and renders animations into
.mp4videos. - User-Friendly Frontend: Built with Next.js and Tailwind CSS for a responsive and intuitive user experience.
- Robust Backend: Powered by FastAPI, ensuring efficient handling of requests and rendering tasks.
- Frontend: Next.js, Tailwind CSS
- Backend: FastAPI (Python)
- AI Integration: Claude API
- Animation Engine: Manim
- Deployment: Vercel
-
Clone the Repository:
git clone https://github.com/harsh-dev0/Manim-AI.git cd Manim-AI -
Backend Repository:
👉 Backend Repo: https://github.com/harsh-dev0/Manimbe
-
Frontend Setup:
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
-
Access the Application: Open your browser and navigate to
http://localhost:3000. -
Enter a Prompt: Describe the animation you want, such as:
"Animate a sine wave" -
Generate Animation: Click on the "Generate" button.
-
View & Download: Once rendering is complete, view the animation and download the
.mp4file if desired.
"Visualize the Pythagorean theorem with a right-angled triangle and squares on each side."
This prompt would generate an animation illustrating the Pythagorean theorem, showcasing the relationship between the squares of the sides of a right-angled triangle.
- Multi-language Support: Incorporate support for prompts in multiple languages.
- Advanced Editing: Allow users to fine-tune generated animations.
- User Accounts: Enable saving and managing past animations.
- Template Library: Provide a collection of pre-made animation templates for quick generation.
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, open an issue first to discuss your ideas.
This project is licensed under the MIT License..
For questions or feedback, please reach out via twitter.
- Create
frontend/using Next.js + Tailwind - Create
backend/with FastAPI + Python - Install Manim in backend for rendering
- Build Claude API wrapper (POST
/generate-code) - Send prompt → get Python code (as string)
- Save to
.pyfile - Run
manimsubprocess to generate video - Serve the resulting
.mp4from backend
- Input box to enter prompt
- Call backend API (
/generate) with prompt - Show loading spinner
- Display the video once done
- Add download button for
.mp4
- Claude retry/fix if Manim code fails
- Preset prompt buttons
- Gallery of generated videos
- User history / login
This project lets users type a text prompt and generates an educational animation video using Claude and Manim.
Example:
“Show how quicksort works” → 🎬 You get an
.mp4showing the full sorting animation.
| Layer | Tool |
|---|---|
| Frontend | Next.js, Tailwind |
| Backend | Python, FastAPI |
| Animation | Manim CE |
| AI Model | Claude 3 (API) |
| Storage | Local or S3 |