> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inworld.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio formats and endpoints

> Audio and video formats, sample rates, file size limits, and endpoints for the STT API.

## Supported audio formats

| **Format** | **Sync API** | **WebSocket Streaming** |
| :--- | :--- | :--- |
| `LINEAR16` (PCM) | <Icon icon="check" size={18} /> | <Icon icon="check" size={18} /> |
| `MP3` | <Icon icon="check" size={18} /> | <Icon icon="xmark" size={18} /> |
| `OGG_OPUS` | <Icon icon="check" size={18} /> | <Icon icon="xmark" size={18} /> |
| `FLAC` | <Icon icon="check" size={18} /> | <Icon icon="xmark" size={18} /> |
| `AUTO_DETECT` | <Icon icon="check" size={18} /> | <Icon icon="xmark" size={18} /> |

Use a 16,000 Hz sample rate, 16-bit depth, and mono audio as defaults. For container formats (MP3, FLAC, OGG_OPUS, WAV), `sampleRateHertz` is optional. The API reads the sample rate from the file header.

`.m4a` files (audio-only MP4, typically AAC) work on the synchronous and [asynchronous](https://docs.inworld.ai/stt/async-transcription.md) endpoints — send `AUTO_DETECT`. Do not send `MP4` for an audio-only file: that encoding expects a video container, and the request fails on both endpoints.

## Video files

You can send a video file to transcribe its audio. The API extracts the audio track and discards the video. You are billed for the audio duration, as with any other recording.

| **Format** | **Sync API** | **WebSocket Streaming** |
| :--- | :--- | :--- |
| `MP4` — also covers `.m4v` and `.mov` | <Icon icon="check" size={18} /> | <Icon icon="xmark" size={18} /> |
| `WEBM` | <Icon icon="check" size={18} /> | <Icon icon="xmark" size={18} /> |
| `MXF` | <Icon icon="check" size={18} /> | <Icon icon="xmark" size={18} /> |

These formats identify the container. The API reads the audio codec from the file: AAC, AC-3, E-AC-3, ALAC, Opus, MP3, or uncompressed PCM. `AUTO_DETECT` works for all of them. You can specify the container to get an earlier, clearer error if the file doesn't match.

`.mov` and `.m4v` are the same container as `.mp4`, so send `MP4` for those. `.mkv` is accepted as `WEBM`, which is the same Matroska container.

<Note>
Video files often exceed the synchronous endpoint's **~16 MB** limit. A few minutes of 1080p video can exceed it even when the audio track is small. Use [asynchronous transcription](https://docs.inworld.ai/stt/async-transcription.md) for video. It accepts files up to 512 MB. Use `audioUri` to point to a file in cloud storage instead of uploading it.
</Note>

<Note>
Sync transcription accepts audio files up to **~16 MB**. How much audio fits depends on the encoding: for example, ~18 minutes of MP3 or ~8 minutes of 16 kHz 16-bit WAV. For larger files, split them into chunks or use the [WebSocket streaming endpoint](https://docs.inworld.ai/api-reference/sttAPI/speechtotext/transcribe-stream-websocket.md).
</Note>

<Note>
STT performs best with 16 kHz audio. Lower sample rates, such as 8 kHz telephony audio, give the model less data and reduce transcription accuracy. Upsampling this audio doesn't improve quality. It fills in values between existing samples without adding new information.
</Note>

## Endpoints

| **Endpoint** | **Method** | **Description** |
| :--- | :--- | :--- |
| [`/stt/v1/transcribe`](https://docs.inworld.ai/api-reference/sttAPI/speechtotext/transcribe.md) | POST | Send complete audio, receive full transcript |
| [`/stt/v1/transcribe:streamBidirectional`](https://docs.inworld.ai/api-reference/sttAPI/speechtotext/transcribe-stream-websocket.md) | WebSocket | Stream audio in real time, receive transcription chunks as they become available |
