Text To Speech
POST/text-to-speech/
Convert text to speech. Args: request: Text-to-speech request parameters service: Text-to-speech service instance tts_history_service: TTS history service voiceover_history_service: Voiceover history service current_user: Authenticated user from JWT (required — provider call costs money) Returns: Audio data in the requested format
Authentication
Authorization: Bearer vm_sk_… with the media.write permission (or all.write). See Authentication. SDK: client.text_to_speech.create (Python), client.textToSpeech.create (Node).
Request body
application/json
| Field | Type | Description |
|---|---|---|
format | string | Output audio format |
history_type | string | History storage type: 'tts' for regular TTS, 'voiceover' for AI Voice Synthesis |
provider | string | AI provider to use |
save_to_history | boolean | Whether to save the audio to history storage |
speed | number | Speech rate (0.5 to 2.0) |
text* | string | Text to convert to speech |
voice | string | Voice to use for synthesis |
Response
200 application/json
| Field | Type | Description |
|---|---|---|
audio_url* | string | |
created_at | string | |
duration* | number | |
format* | string | |
text | string | |
voice | string |
{
"audio_url": "string",
"created_at": "2026-12-05T10:00:00Z",
"duration": 0,
"format": "string",
"text": "string",
"voice": "string"
}Errors
401 | Missing, wrong, revoked or expired key. |
403 | The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client. |
402 | Not enough credits, or the key reached its spending cap. |
422 | The request failed validation; `detail` lists the fields. |
429 | Over a rate limit; retry after `Retry-After` seconds. |
All statuses: Errors.
Example
curl -X POST "https://api.voicemint.io/api/v1/text-to-speech/" \
-H "Authorization: Bearer $VOICEMINT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "string"
}'