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

Response

200
audio/mpeg
A stream of audio bytes.

The response is of type file.