---
title: "Audio To Text"
method: POST
path: "/api/generate/audio-to-text"
tags: ["generate"]
---

# Audio To Text

`POST /api/generate/audio-to-text`

## Request

- The document declares no server URL.
- Auth: none declared

Transcribe audio files to text.

## Request body `multipart/form-data`

- BodyGenAudioToText
  - `audio` string, binary, required: Uploaded audio file to be transcribed.
  - `model_id` string: Hugging Face model ID used for transcription.
  - `return_timestamps` string: Return timestamps for the transcribed text. Supported values: 'sentence', 'word', or a string boolean ('true' or 'false'). Default is 'true' ('sentence'). 'false' means no timestamps. 'word' means word-based timestamps.

## Response `200`

Successful Response

- TextResponse: Response model for text generation.
  - `text` string, required: The generated text.
  - `chunks` Chunk[], required: The generated text chunks.
    - `timestamp` unknown[], required: The timestamp of the chunk.
      - unknown
    - `text` string, required: The text of the chunk.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `413`: Request Entity Too Large
- `415`: Unsupported Media Type
- `422`: Validation Error
- `500`: Internal Server Error
- `default`: Error

## Changes

- **2025-10-30** `dfc937fc0d2c`: 10 breaking, 5 info
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from `object` to no type for status `400`
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from `object` to no type for status `401`
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from `object` to no type for status `413`
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from `object` to no type for status `415`
  - …11 more
- **2025-10-30** `f5d01b71ba9a`: 5 breaking, 10 info
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from no type to `object` for status `400`
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from no type to `object` for status `401`
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from no type to `object` for status `413`
  - the `oneOf[subschema #1: HTTPError]/detail` response's property type changed from no type to `object` for status `415`
  - …11 more
- **2024-11-08** `9a9cebf12315`: 2 info
  - added the new optional request property `return_timestamps`
  - added the non-success response with the status `415`
- **2024-10-03** `cbf999b9a7cf`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/livepeer/apis/livepeer-ai-api/changes/api/generate/audio-to-text/post.md)

---

[API](https://skmtc.dev/livepeer/apis/livepeer-ai-api.md) - [All operations](https://skmtc.dev/livepeer/apis/livepeer-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/livepeer/apis/livepeer-ai-api/revisions/dfc937fc0d2c?raw)
