TextToSpeech
Get voice preview
Returns a short audio preview for an existing voice. The preview text is determined server-side and cannot be customized. This endpoint is not metered or billed, making it ideal for voice browsing and selection experiences. Rate and concurrency limits are stricter than for synthesis, so cache preview audio on your side instead of calling this endpoint once per listener. Audio is always returned in MP3 format.
/tts/v1/voice:previewPreview a system or workspace voice
Send GET https://api.inworld.ai/tts/v1/voice:preview with query parameters
voice_id and model_id, and the header Authorization: Basic <INWORLD_API_KEY>.
Use the exact voiceId returned by List voices.
System voice IDs such as Ashley work here.
curl --get 'https://api.inworld.ai/tts/v1/voice:preview' \
--header "Authorization: Basic $INWORLD_API_KEY" \
--data-urlencode 'voice_id=Ashley' \
--data-urlencode 'model_id=inworld-tts-2'The response is a single JSON object:
{"audioContent":"<base64-encoded MP3>"}Base64-decode audioContent to play or save the MP3. Preview text is selected by
the service and cannot be customized; previews are not billed. To speak your own
text, use synthesis.
This preview uses the TTS endpoint and a voice_id query parameter. Do not
construct /voices/v1/voices/Ashley:preview or treat a system voice ID as a
workspace voice-management resource name. Voice metadata and synthesis use
different identifier shapes.
Authorizationstringrequired
Your authentication credentials. For Basic authentication, please populate Basic $INWORLD_API_KEY. You can create a key in one command with the Inworld CLI: inworld workspace add-key.
voice_idstringrequired
The identifier of the voice to preview. Use the List Voices endpoint to discover available voice IDs.
model_idstringrequired
The identifier of the TTS model to use for generating the preview. See Models for available models.
audioContentstring
The audio data bytes encoded as MP3. The preview text is determined server-side and cannot be customized.