---
title: "Generates audio from the input text."
method: POST
path: "/openai/v1/audio/speech"
tags: ["Audio"]
---

# Generates audio from the input text.

`POST /openai/v1/audio/speech`

## Request body

- CreateSpeechRequest
  - `model` union, required — One of the [available TTS models](/docs/text-to-speech).
    - string
    - 'playai-tts' | 'playai-tts-arabic'
  - `input` string, required — The text to generate audio for.
  - `voice` string, required — The voice to use when generating the audio. List of voices can be found [here](/docs/text-to-speech).
  - `response_format` 'flac' | 'mp3' | 'mulaw' | 'ogg' | 'wav' — The format of the generated audio. Supported formats are `flac, mp3, mulaw, ogg, wav`.
  - `sample_rate` 8000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 — The sample rate for generated audio
  - `speed` number — The speed of the generated audio.

## Response `200`

OK

## Changes

- **2025-05-29** `a2ddf0c5cb79` — 7 info
  - added the new optional request property `sample_rate`
  - the `response_format` request property default value changed from `wav` to `mp3`
  - added the new `flac` enum value to the request property `response_format`
  - added the new `mulaw` enum value to the request property `response_format`
  - …3 more
- **2025-05-16** `ee34f94100e3` — 1 info
  - added `subschema #2` to the `model` request property `anyOf` list
- **2025-04-22** `37498d19ece8` — 1 breaking, 2 info
  - removed the media type `application/octet-stream` for the response with the status `200`
  - added the new `mp3` enum value to the request property `response_format`
  - added the media type `audio/wav` for the response with the status `200`
- **2025-03-19** `57e8ccf3bae4` — 7 breaking, 1 info
  - removed the enum value `aac` of the request property `response_format`
  - removed the enum value `flac` of the request property `response_format`
  - removed the enum value `mp3` of the request property `response_format`
  - removed the enum value `opus` of the request property `response_format`
  - …4 more
- **2025-01-29** `c5b2589925cd` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/groq/apis/groqcloud-api/changes/openai/v1/audio/speech/post.md)

---

[API](https://skmtc.dev/groq/apis/groqcloud-api.md) · [All operations](https://skmtc.dev/groq/apis/groqcloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/groq/groqcloud-api/revisions/ea91f46f212a/schema)
