POST
/
api
/
v1
/
tts
/
stream
curl --request POST \
  --url https://api.play.ai/api/v1/tts/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-USER-ID: <api-key>' \
  --data '{
  "model": "PlayDialog-turbo",
  "text": "Hello, this is a test of the PlayDialog-turbo model.",
  "voice": "Atlas-PlayAI",
  "outputFormat": "wav",
  "language": "english"
}'
This response does not have an example.

Convert text to speech and receive audio bytes in real-time in Turbo mode.

This endpoint only supports Dialog 1.0 Turbo: Our fastest model with best quality and multi-turn dialogue capabilities, but with a narrower feature set than Dialog 1.0 and Play 3.0 Mini.

For more information, see Models.

Check out the How to use Dialog 1.0 Text-to-Speech API guide for a step-by-step approach to using the PlayAI API to convert text into natural human-like sounding audio.

Or click “Try it” above to see the API in action!

Authorizations

Authorization
string
header
required

Your secret API key from PlayAI, formatted as Bearer YOUR_SECRET_API_KEY.

X-USER-ID
string
header
required

Your unique user ID from PlayAI.

Body

application/json
model
enum<string>
required

The voice engine used to synthesize the voice.

Available options:
PlayDialog-turbo
Example:

"PlayDialog-turbo"

text
string
required

The text to be converted to speech. Limited to 20,000 characters.

Example:

"Hello, this is a test of the PlayDialog-turbo model."

voice
enum<string>
required

The unique ID for a PlayAI PlayDialog-turbo Voice. Available voices depend on the selected language:

  • For Arabic: Nasser-PlayAI, Khalid-PlayAI, Amira-PlayAI, Ahmad-PlayAI
  • For English: Arista-PlayAI, Atlas-PlayAI, Basil-PlayAI, Briggs-PlayAI, Calum-PlayAI, Celeste-PlayAI, Cheyenne-PlayAI, Chip-PlayAI, Cillian-PlayAI, Deedee-PlayAI, Fritz-PlayAI, Gail-PlayAI, Indigo-PlayAI, Mamaw-PlayAI, Mason-PlayAI, Mikail-PlayAI, Mitch-PlayAI, Quinn-PlayAI, Thunder-PlayAI

More voices will be available soon.

Available options:
Arista-PlayAI,
Atlas-PlayAI,
Basil-PlayAI,
Briggs-PlayAI,
Calum-PlayAI,
Celeste-PlayAI,
Cheyenne-PlayAI,
Chip-PlayAI,
Cillian-PlayAI,
Deedee-PlayAI,
Fritz-PlayAI,
Gail-PlayAI,
Indigo-PlayAI,
Mamaw-PlayAI,
Mason-PlayAI,
Mikail-PlayAI,
Mitch-PlayAI,
Quinn-PlayAI,
Thunder-PlayAI,
Nasser-PlayAI,
Khalid-PlayAI,
Amira-PlayAI,
Ahmad-PlayAI
Example:

"Atlas-PlayAI"

outputFormat
enum<string> | null
default:wav

The format for the output audio. More will be available soon.

Available options:
wav
language
enum<string> | null
default:english

The language of the voice. More will be available soon.

Available options:
arabic,
english
Example:

"english"

Response

200
audio/mpeg
A stream of audio bytes.

The response is of type file.