API Reference
Backend API endpoints for MovingLines
API Reference
MovingLines provides a RESTful API built with FastAPI. Below are the primary endpoints used by the frontend and available for public integration.
Animations
POST /api/animations/generate
Starts the agentic generation and rendering process.
Request Body:
{
"prompt": "Explain the concept of derivatives",
"duration": 15,
"quality": "m"
}quality:l(480p),m(720p),h(1080p),k(4K)
Response:
{
"task_id": "c49e6331-1b25-4033-839d-ee695e6a05c1",
"status": "processing"
}GET /api/animations/status/{task_id}
Returns the current status of an animation task.
Response:
{
"status": "rendering",
"progress": 45,
"video_url": null
}Chat & History
GET /api/animations/chats
Retrieves a list of all animation chats for the authenticated user.
GET /api/animations/chats/{chat_id}/history
Retrieves the full message and video history for a specific chat.
Status Updates (Socket.IO)
For real-time logs, the frontend connects to:
ws://localhost:8000/socket.io
Events:
status_update: Emitted after every major step (Planning, RAG, Rendering).render_log: Streams the raw Manim CLI output.
Authentication
All requests must include a Supabase JWT in the header:
Authorization: Bearer <your_jwt_token>