Create Speech
POST https://api.braiv.com/v1/text-to-speech/{voice_id}Content-Type: application/jsonxi-api-key: YOUR_BRAIV_API_KEYConverts text into speech using a Braiv voice clone and returns audio.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
voice_id | string | yes | The id of an existing Braiv voice clone owned by the API key’s user. |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | Text to convert into speech. |
model_id | string | no | Use braiv-speech-v1. ElevenLabs model ids are accepted for migration compatibility but map to Braiv Speech. |
language_code | string | no | ISO language code. Defaults to the voice clone language. |
voice_settings.speed | number | no | Playback/synthesis speed. Defaults to 1. |
Unsupported ElevenLabs fields such as stability, similarity_boost, style, seed, previous_text, and next_text may be sent by existing SDK clients, but are ignored during the beta unless explicitly documented.
Output format
Section titled “Output format”The beta returns audio/wav. Explicit non-WAV output_format values are rejected until MP3/PCM transcoding is available.
Example
Section titled “Example”curl -X POST "https://api.braiv.com/v1/text-to-speech/YOUR_VOICE_ID" \ -H "xi-api-key: YOUR_BRAIV_API_KEY" \ -H "Content-Type: application/json" \ --output speech.wav \ --data '{ "text": "The first move is what sets everything in motion.", "model_id": "braiv-speech-v1", "language_code": "en", "voice_settings": { "speed": 1 } }'Successful response
Section titled “Successful response”HTTP/1.1 200 OKContent-Type: audio/wavThe response body is the generated WAV audio bytes.