Base URL
The API server runs on:/api/ except for the health check endpoint.
CORS Configuration
The API is configured to accept requests from the following origins:http://localhost:5173http://127.0.0.1:5173
- Credentials: Allowed
- Methods: All methods (
*) - Headers: All headers (
*)
Authentication
Currently, the API does not require authentication. All endpoints are publicly accessible.Common Response Patterns
Success Response
Successful requests return a JSON response with astatus field:
Error Response
Failed requests return an HTTP error status code with a detail message:Common Status Codes
| Status Code | Description |
|---|---|
200 | OK - Request succeeded |
206 | Partial Content - Range request succeeded (video streaming) |
404 | Not Found - Resource doesn’t exist |
416 | Range Not Satisfiable - Invalid range header |
500 | Internal Server Error - Server-side error occurred |
Error Handling
The API uses FastAPI’sHTTPException for error handling. Errors include:
- 404 Not Found: When a generation ID, video file, or resource doesn’t exist
- 416 Range Not Satisfiable: When an invalid
Rangeheader is provided for video streaming - 500 Internal Server Error: When video generation or processing fails
detail field with a descriptive error message:
Rate Limiting
The API does not currently implement rate limiting. Consider implementing rate limiting in production environments to prevent abuse.
Real-Time Progress Updates
The API provides Server-Sent Events (SSE) for real-time progress tracking during video generation. See the Progress endpoint for details.Video Streaming
The API implements RFC 7233 Range Requests for efficient video streaming. This allows:- Seeking within videos
- Resumable downloads
- Bandwidth-efficient partial content delivery
Available Endpoints
Generation Endpoints
- POST
/api/generate- Start a new video generation - GET
/api/progress/{generation_id}- Stream real-time progress via SSE - GET
/api/status/{generation_id}- Get current generation status - GET
/api/video/{filename}- Stream generated video file
Data Retrieval Endpoints
- GET
/api/content/{generation_id}- Get generated presentation content structure - GET
/api/script/{generation_id}- Get generated narration scripts
System Endpoints
- GET
/health- Health check endpoint
Health Check
A health check endpoint is available at/health: