Skip to Content
Speech

Speak text

POST
/speech

For apps that read short text aloud, such as a chat reply or a podcast line. Uses the saved provider, model, voice and speed unless the request names them. The characters count against compute limits like any synthesis. Nothing is added to the library; split longer text into several requests.

Authorization

headerAuthorizationBearer <token>

Authorization code with S256 PKCE. Discover issuer metadata at /.well-known/oauth-authorization-server/api/auth and resource metadata at /.well-known/oauth-protected-resource/api/v1. Request the /api/v1 resource explicitly. The same token endpoint also supports the advertised OAuth device grant.

Scope: audio:generate

Request Body

application/json
  1. body
text*string

The text to speak. Surrounding whitespace is trimmed first, and the trimmed text must be 1 to 2000 UTF-16 code units (characters outside the Basic Multilingual Plane, such as emoji, count as 2).

Length1 <= length
provider?string

Shared provider slug. Omit to use the saved provider.

Lengthlength <= 200
model?string

Model ID, at most 256 UTF-16 code units (emoji count as 2). Omit to use the saved model, or the default model of the named provider.

Lengthlength <= 256
voice?string

Voice ID within that provider and model, at most 512 UTF-16 code units. Omit to use the saved voice, or the first voice of the named provider. A named voice must be one the provider lists.

Lengthlength <= 512
modelSpeed?number

Speaking rate the model generates at, for models that support one. Omit to use the saved voice speed.

Range0.5 <= value <= 3

Response Body

MP3 audio of the text, made once and stored nowhere.

response?fileaudio/mpeg
Formatbinary
Example Request
curl -X POST 'https://reader.example/api/v1/speech' \  -H 'Content-Type: application/json' \  -d '{  "text": "Hello there."}'
Example Response
"string"