Audio Transcription
Reports audio-transcription decoding capabilities.#
/lmkit/v1/audio-transcription/capabilitiesReturns whether ffmpeg is available on the server (so it can decode any format) and the list of file extensions it can currently decode. With ffmpeg the set includes video containers (mp4, mov, mkv, webm, avi, ...): transcription extracts and transcribes their audio track. Clients use this to decide whether to upload a recording as-is or transcode it locally first.
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/audio-transcription/capabilities" \
-H "Authorization: Bearer $LMKIT_API_KEY"Transcribes spoken content from an audio or video file (JSON: base64 or file identifier).#
/lmkit/v1/audio-transcriptionAccepts an audio or video file as base64 (input_format 'Base64EncodedFile') or as the identifier of a previously uploaded file (input_format 'FileIdentifier'), plus an optional model identifier. 'language' pins the spoken language (ISO-639-1) instead of detecting it; 'enable_vad' controls the voice-activity pre-segmentation that skips silence (on by default), and 'vad' tunes it. Runs speech-to-text on the specified or default model and returns the full transcript and the average confidence score. If processing exceeds the configured timeout, returns 202 Accepted with a job_id. Poll GET /lmkit/v1/jobs/ for status and results.
Video containers (mp4, mov, mkv, webm, avi, ... - see the capabilities route) are accepted when ffmpeg is available on the server: the audio track is extracted and transcribed. A video that declares no audio track answers 422 Unprocessable Content.
Large files: the base64 body is bounded by the configured "Max upload size" (default 100 MB), but base64 inflates a file by ~33%, is buffered whole in memory, and is the least efficient path. For large or long recordings prefer either (a) POST the raw file to /lmkit/v1/audio-transcription/file (multipart, streamed to disk), or (b) POST it once to /lmkit/v1/files/upload and reference the returned fileId here with input_format 'FileIdentifier'. An oversized body is rejected with 413 Payload Too Large.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
model | string | The identifier of the transcription model to use. If not provided, the default model is used. |
inputrequired | string | The audio or video file to transcribe (a video's audio track is extracted). When input_format is 'Base64EncodedFile', provide a base64-encoded file payload. When 'FileIdentifier', provide the file ID previously returned by the lmkit/v1/files/upload endpoint. Supported formats: see GET /lmkit/v1/audio-transcription/capabilities. |
input_format | How the input is provided. Accepted values: 'Base64EncodedFile' or 'FileIdentifier'. 'Base64EncodedFile' expects a base64-encoded audio file. 'FileIdentifier' references a file previously uploaded via lmkit/v1/files/upload. Defaults to 'Base64EncodedFile'. | |
language | string | ISO-639-1 code of the spoken language (e.g. 'en', 'fr'). Omit (or pass 'auto') to detect it automatically. A code the loaded model does not support is refused with 400. |
enable_vad | boolean | Whether to pre-segment the audio with voice activity detection, skipping silence. On (the default) is faster on real-world recordings and avoids hallucinated text in silent regions; off processes the full stream, including silence. |
vad | Optional voice-activity-detection tuning, applied when enable_vad is on. Omitted fields keep the engine defaults. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 400 | Bad Request | |
| 413 | Payload Too Large | |
| 422 | Unprocessable Entity | |
| 500 | application/json | Internal Server Error |
| 404 | Not Found |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/audio-transcription" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "",
"input": "",
"input_format": "Base64EncodedFile",
"language": "",
"enable_vad": true
}'Transcribes spoken content from an uploaded audio or video file (multipart/form-data).#
/lmkit/v1/audio-transcription/fileAccepts an audio or video file as a raw multipart/form-data upload (form field 'file'), plus an optional 'model' form field. This is the recommended path for large or long recordings: the file is streamed to disk rather than buffered whole in memory, and no base64 inflation applies. The upload is bounded by the configured "Max upload size" (default 100 MB); an oversized file is rejected with 413 Payload Too Large. Video containers are accepted when ffmpeg is available on the server: the audio track is extracted and transcribed; a video that declares no audio track answers 422 Unprocessable Content. Behaves identically to the JSON endpoint otherwise: returns the transcript and average confidence, or 202 Accepted with a job_id when processing exceeds the configured timeout (poll GET /lmkit/v1/jobs/).
Request body
application/x-www-form-urlencoded · object
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 400 | Bad Request | |
| 413 | Payload Too Large | |
| 422 | Unprocessable Entity | |
| 500 | application/json | Internal Server Error |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/audio-transcription/file" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/x-www-form-urlencoded"