Backend

Hono-based API server for Luma AI video generation.

API Endpoints

POST /api/generate

Creates a new video generation request.

Request Body:

{ "prompt": "Description of the video to generate", "aspect_ratio": "16:9" // Options: "16:9", "9:16", "4:3", "3:4", "1:1" }

Response:

{ "success": true, "data": { "id": "generation-id", "state": "queued", // ... other generation details } }

GET /api/generation/:id

Gets the status and details of a video generation.

Response:

{ "success": true, "data": { "id": "generation-id", "state": "completed", // "queued", "dreaming", "completed", "failed" "assets": { "video": "https://video-url.mp4", // Available when completed "image": "https://thumbnail-url.jpg", "progress_video": "https://progress-url.mp4" // Available during generation }, // ... other details } }

Environment Variables

  • LUMAAI_API_KEY - Required. Your Luma AI API key

Static File Serving

  • / - Serves the main HTML page
  • /frontend/* - Serves frontend React components and assets
  • /shared/* - Serves shared TypeScript types and utilities