---
title: "Openai Audio Speech"
method: POST
path: "/v1/audio/speech"
tags: ["Audio"]
---

# Openai Audio Speech

`POST /v1/audio/speech`

## Headers

- `x-deepinfra-source` string, nullable
- `xi-api-key` string, nullable
- `x-api-key` string, nullable

## Request body

- OpenAITextToSpeechIn
  - `service_tier` 'default' | 'priority' | 'flex'
  - `fail_fast` boolean — If true, the request is rejected immediately with HTTP 429 when the model has no spare capacity, instead of waiting in the queue. Opt-in; the default (false) keeps standard queueing behavior.
  - `model` string, required — model name
  - `input` string, required — Text to convert to speech
  - `voice` string, nullable — Preset voices to use for the speech.
  - `response_format` 'mp3' | 'opus' | 'flac' | 'wav' | 'pcm' — Select the desired format for the speech output. Supported formats include mp3, opus, flac, wav, and pcm.
  - `speed` number — speed of the speech
  - `extra_body` object, nullable — Extra body parameters for the model.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

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