---
title: "Flux Text to Speech (batch)"
method: POST
path: "/v2/speak"
tags: ["audio"]
---

# Flux Text to Speech (batch)

`POST /v2/speak`

Synthesize a complete block of text into a single audio response using Deepgram's Flux TTS batch (REST) API. Use this for pre-rendering fixed audio (IVR prompts, notifications, narration) where the whole text is known up front and you don't need incremental playback or interruption.

## Query parameters

- `callback` string
- `callback_method` 'POST' | 'PUT'
- `mip_opt_out` boolean
- `tag` union
  - string
  - string[]
- `bit_rate` union
  - '8000' | '16000' | '24000' | '32000' | '40000' | '48000' — Encoding - mp3(default). Supported bitrates - 8000, 16000, 24000, 32000, 40000, 48000(default) bps.
  - integer
  - integer
- `container` union
  - 'none' — No container.
  - 'wav' — Encoding - linear16. Supported container - wav (default), or no container.
  - 'wav' — Encoding - mulaw. Supported container - wav (default), or no container.
  - 'wav' — Encoding - alaw. Supported container - wav (default), or no container.
  - 'ogg' — Encoding - opus. Supported container - ogg (default).
- `encoding` union
  - 'linear16' — Encoding - linear16. Uncompressed, high-quality audio format often used for telephony or audio processing.
  - 'flac' — Encoding - flac. Lossless audio format for high-quality compression.
  - 'mulaw' — Encoding - mulaw. Compressed audio format commonly used in telephony.
  - 'alaw' — Encoding - alaw. Similar to mulaw but used in international telephony.
  - 'mp3' — Encoding - mp3. Popular compressed audio format for music and streaming.
  - 'opus' — Encoding - opus. High-compression audio format optimized for real-time communications.
  - 'aac' — Encoding - aac. Advanced audio format offering better quality at smaller file sizes than mp3.
- `model` string, required
- `sample_rate` union
  - '8000' | '16000' | '24000' | '32000' | '44100' | '48000' — Encoding - linear16. Supported sample rates - 8000, 16000, 24000, 32000, 44100, 48000 Hz.
  - '8000' | '16000' — Encoding - mulaw. Supported sample rates - 8000, 16000 Hz.
  - '8000' | '16000' — Encoding - alaw. Supported sample rates - 8000, 16000 Hz.
  - '8000' | '16000' | '22050' | '32000' | '48000' — Encoding - flac. Supported sample rates - 8000, 16000, 22050, 32000, 48000 Hz.
- `priority` 'low'

## Headers

- `Authorization` string, required

## Request body

- SpeakV2Request — Request body for Flux TTS batch (REST) text-to-speech conversion. The full block of text is synthesized in a single request and returned as one audio response.
  - `text` string, required — The text content to be converted to speech. The server normalizes and preprocesses the text (e.g. stripping inline controls) before synthesis.

## Response `200`

Returns the synthesized audio in the requested encoding as a binary stream. When a `callback` URL is supplied, the request is processed asynchronously and the response body is instead a JSON acknowledgement (Content-Type `application/json`) of the form {"request_id": "..."}, with the audio delivered to the callback URL. Because this endpoint is typed as a binary audio stream, SDK callers that set `callback` receive this JSON acknowledgement through the audio byte iterator as raw bytes and must join the chunks and parse `request_id` themselves.

- SpeakV2AcceptedResponse — Accepted response returned when a callback URL is supplied; the audio is delivered asynchronously to that URL.
  - `request_id` string, uuid, required — Unique identifier for tracking the asynchronous request

## Other responses

- `400` — Invalid Request

---

[API](https://skmtc.net/deepgram/apis/rest-api.md) · [All operations](https://skmtc.net/deepgram/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepgram/rest-api/revisions/bd7ba5c18a6b/schema)
