---
title: "Audio transcriptions"
method: POST
path: "/dedicated/v1/audio/transcriptions"
tags: ["Dedicated.Audio"]
---

# Audio transcriptions

`POST /dedicated/v1/audio/transcriptions`

## Request

- Base URL: `https://api.friendli.ai`
- URL: `https://api.friendli.ai/dedicated/v1/audio/transcriptions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/dedicated/v1/audio/transcriptions/post.ts> (a function with typed inputs; its response is checked against the schema)

Given an audio file, the model transcribes it into text.

## Headers

- `X-Friendli-Team` string, nullable: ID of team to run requests as (optional parameter).

## Request body `multipart/form-data`

- DedicatedAudioTranscriptionBody
  - `model` string, required: ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.
  - `file` string, binary, required: The audio file object (not file name) to transcribe, in one of these formats: mp3, wav, flac, ogg, and many other standard audio formats.
  - `chunking_strategy` union: Controls how the audio is cut into chunks. When set to `"auto"`, the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block.
    - 'auto'
    - ServerVadChunkingStrategy
      - `type` 'server_vad', required: Must be set to `server_vad` to enable manual chunking using server side VAD.
      - `prefix_padding_ms` integer, nullable: Amount of audio to include before the VAD detected speech (in milliseconds).
      - `silence_duration_ms` integer, nullable: Duration of silence to detect speech stop (in milliseconds). With shorter values the model will respond more quickly, but may jump in on short pauses from the user.
      - `threshold` number, nullable: Sensitivity threshold (0.0 to 1.0) for voice activity detection. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.
  - `language` string, nullable: The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will improve accuracy and latency.
  - `stream` boolean, nullable: Whether to stream the transcription result. When set to `true`, the transcription result will be streamed as [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#event_stream_format) once generated.
  - `temperature` number, nullable: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

## Response `200`

Successfully transcribed the audio file.

- DedicatedAudioTranscriptionSuccess
  - `text` string, required: The transcribed text.
  - `usage` AudioTranscriptionUsage, required
    - `type` 'tokens', required: The type of the usage object. Always `tokens` for this variant.
    - `input_tokens` integer, required: Number of input tokens billed for this request.
    - `output_tokens` integer, required: Number of output tokens generated.
    - `total_tokens` integer, required: Total number of tokens used (input + output).
    - `input_audio_length_ms` integer, required: The length of the input audio in milliseconds.
    - `processed_audio_length_ms` integer, required: The length of the processed audio in milliseconds.
    - `input_token_details` AudioTranscriptionInputTokenDetails
      - `audio_tokens` integer, required: Number of audio tokens billed for this request.
      - `text_tokens` integer, required: Number of text tokens billed for this request.

## Other responses

- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/friendli/apis/friendli-suite-api-reference.md) - [All operations](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/revisions/38fb43993a11?raw)
