Lektor API ========== synchronously creates a selectable Polish lektor track from uploaded media and discovered subtitles ROUTES: Method | Path | Description ------ | --------------- | -------------------------- POST | /api/lektor | create Polish lektor media GET | /api | service info and defaults GET | /api/health | service status GET | / | usage reference POST /api/lektor ================ curl -X POST http://localhost:$PORT/api/lektor \ -F "media=@episode.mp4" \ -F "subtitles=@optional.srt" \ -F "subtitleSource=auto" \ -F "subtitleLanguage=auto" \ -F "subtitleQuery=The Office S01E01" \ -F "embedPolishSubtitles=true" \ -F "duckingRatio=4" \ -F "densePauseMs=500" \ -F "denseSpeedupMin=0" \ -F "denseSpeedupMax=4" \ -F "fishVoice=4f63d293e42d4ec9adf3d9ab1ad2652c" \ -F "bare=true" \ -F "concurrency=2" \ -F "force=false" \ --output polish-lektor.mp4 the request remains open until the complete output file is ready the endpoint has no authentication and permits 10 requests per client IP per UTC day an uploaded subtitles file overrides automatic subtitle discovery automatic discovery tries embedded Polish, embedded English, OpenSubtitles Polish, then OpenSubtitles English English subtitles are contextually translated to concise spoken Polish before synthesis generated Polish subtitles are embedded as a selectable MP4 track unless embedPolishSubtitles is false subtitleSource values are auto, embedded, opensubtitles, or upload subtitleLanguage values are auto, pl, or en REQUEST FIELDS: Field | Type | Default -------------------- | ------- | ---------------------------------- media | File | - subtitles | File | null subtitleSource | string | "auto" subtitleLanguage | string | "auto" subtitleQuery | string | null embedPolishSubtitles | boolean | true duckingRatio | number | 4 densePauseMs | number | 500 denseSpeedupMin | number | 0 denseSpeedupMax | number | 4 fishVoice | string | "4f63d293e42d4ec9adf3d9ab1ad2652c" bare | boolean | true concurrency | number | 2 force | boolean | false EXAMPLE RESPONSE: Streams the completed MP4 with selectable Polish Lektor audio and Polish subtitle tracks, or a WAV narration for audio-only input. ERROR RESPONSE: "error": "No Polish or English subtitles could be resolved for the uploaded media."