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

# Text To Speech

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

Generate a text-to-speech audio file based on the provided text input and speaker description.

## Request body

- TextToSpeechParams
  - `model_id` string, required — Hugging Face model ID used for text to speech generation.
  - `text` string — Text input for speech generation.
  - `description` string — Description of speaker to steer text to speech generation.

## Response `200`

Successful Response

- AudioResponse — Response model for audio generation.
  - `audio` MediaURL, required — A URL from which media can be accessed.
    - `url` string, required — The URL where the media can be accessed.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal Server Error
- `default` — Error

---

[API](https://skmtc.net/livepeer/apis/untitled-api.md) · [All operations](https://skmtc.net/livepeer/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/livepeer/untitled-api/versions/dfc937fc0d2c/schema)
