Skip to content
VoiceMint Developers

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

FieldTypeDescription
formatstringOutput audio format
history_typestringHistory storage type: 'tts' for regular TTS, 'voiceover' for AI Voice Synthesis
providerstringAI provider to use
save_to_historybooleanWhether to save the audio to history storage
speednumberSpeech rate (0.5 to 2.0)
text*stringText to convert to speech
voicestringVoice to use for synthesis

Response

200 application/json

FieldTypeDescription
audio_url*string
created_atstring
duration*number
format*string
textstring
voicestring
{
  "audio_url": "string",
  "created_at": "2026-12-05T10:00:00Z",
  "duration": 0,
  "format": "string",
  "text": "string",
  "voice": "string"
}

Errors

401Missing, wrong, revoked or expired key.
403The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client.
402Not enough credits, or the key reached its spending cap.
422The request failed validation; `detail` lists the fields.
429Over 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"
}'