# API Reference Base URL: `https://api.nomadkaraoke.com` (production) or `http://localhost:8000` (local) ## Authentication All endpoints except `/health` and `/api/themes` require authentication. ```bash curl -H "Authorization: Bearer YOUR_TOKEN" ... ``` ## Endpoints ### Health ```http GET /health ``` No auth required. Returns service status. #### Encoding Worker Health ```http GET /health/encoding-worker ``` No auth required. Returns GCE encoding worker status for frontend display. Response: ```json { "available": true, "status": "ok", "version": "0.95.1", "active_jobs": 0, "queue_length": 0 } ``` Status values: - `ok` - Worker is healthy and available - `offline` - Worker is unavailable (includes `error` field) - `not_configured` - Encoding worker not configured on backend #### Flacfetch Service Health ```http GET /health/flacfetch ``` No auth required. Returns flacfetch service status for frontend display. Response: ```json { "available": true, "status": "ok", "version": "1.2.3" } ``` Status values: - `ok` - Flacfetch service is healthy and available - `offline` - Service is unavailable (includes `error` field) - `not_configured` - Flacfetch service not configured on backend ### Jobs #### Create Job with Upload ```http POST /api/jobs/upload Content-Type: multipart/form-data file: