Skip to main content
POST
Generate speech

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Scopes

full_access
PersonalAccessTokenAuth
full_access
WorkspaceApiKeyAuth
full_access
WorkspaceApiKeyBearerAuth

Headers

Idempotency-Key
string

One key per operation, 1 to 128 characters. A retry with the same key and request within 24 hours returns the first response.

Example:

"7f3c9a2e-retry-1"

X-Active-Branch-Id
string

ID of the branch the editor shows. Used when branch_id is omitted, for users who work on protected-main branches.

Path Parameters

app_id
string
required

ID of the app to generate media for.

Body

application/json
input
string
required

required; the spoken text, not text or prompt

Required string length: 1 - 10000
Example:

"Welcome to the shop."

dry_run
boolean
default:false

true returns a credit estimate without generating or charging; omit or false to generate

model
string | null

model alias or vendor ID; omitted or "automatic" selects a fixed default, not a model chosen to satisfy requested controls

Maximum string length: 100
voice
string | null

model-specific, case-sensitive name; omitted uses the model's default

Maximum string length: 100
response_format
string | null

audio encoding, not "url" or "b64_json"; omitted uses the model's default

Maximum string length: 20
speed
number | null

model-specific range; omit or use 1 for normal speed

instructions
string | null

delivery and style guidance, supporting models only; keep it out of the spoken input

Maximum string length: 4000
language
string | null

model-specific ISO-639 code; omit for automatic language handling

Maximum string length: 20

Response

The stored audio file, or an estimate for a dry run.

url
string
required

Public URL of the stored audio file. Anyone with the link can open it, and the link doesn't expire.

media_type
string
required

The audio file's media type.

Example:

"audio/mpeg"

usage
MediaUsage · object
required