Piko.ai is an AI-powered learning assistant that turns any topic into beautiful Manim-based animations and concise explanations — all from a simple prompt.
-
🧠 AI-Powered Animation Generation
Enter a topic (e.g. “binary trees” or “rotational motion”), and instantly generate Manim code using Google's Gemini LLM.
-
🎬 Automatic Video Compilation
The generated Python code is saved, compiled using Manim CLI, and the output
.mp4video is served automatically to the frontend. -
📝 Topic Explanation with LLM
Along with the animation, a concise textual explanation is generated to help users understand the topic better.
-
🎧 Audio Narration
Support for accompanying
.wavaudio narration for enhanced understanding. -
🌐 Modern Frontend Experience
Built with Next.js, Tailwind CSS, Framer Motion, and ShadCN for smooth UX, animations, and mobile responsiveness.
| Landing Page | Generated Animation + Explanation |
|---|---|
![]() |
![]() |
For a demo video, click here.
Next.js 14with App RouterTailwind CSSfor stylingFramer Motionfor animationsShadCN UIfor beautiful components
FastAPIfor API endpoints and routingGoogle Gemini APIfor code + explanation generationManimCLI for compiling Python animationsFAISSfor creating a vector index of documentation
Mermaid Block:
graph TD;
User["User enters a topic"] -->|"POST /code/{topic}"| FastAPI
FastAPI -->|"Generate search query from topic"| QueryGen
QueryGen -->|"Perform FAISS similarity search"| VectorDB["Vector Store (FAISS)"]
VectorDB -->|"Top docs as context"| FastAPI
FastAPI -->|"Prompt Gemini with context + topic"| GeminiAPI
GeminiAPI -->|"Returns Manim code + explanation"| FastAPI
FastAPI -->|"Compile with Manim CLI"| MP4[".mp4 Video"]
FastAPI -->|"Return video + explanation"| Frontend
Frontend -->|"Display animation and text"| User
- Clone & Setup Backend
git clone https://github.com/yourusername/piko-ai.git
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt- Run FastAPI server
uvicorn main:app --host 0.0.0.0 --port 8000- Setup Frontend
cd ../frontend
npm install
npm run devCreate a .env file in the root folder:
GEMINI_API_KEY = your_google_gemini_api_key

