Text to Speech
FreshPurpose
Generate AI voiceovers from text using Creatify's Text to Speech API with multiple voices, languages, and accents.
Prerequisites
- Authenticated API access (Authentication SOP)
- Text content to convert to speech
- Voice ID (from the voices list endpoint)
- Sufficient credits
Procedure
Step 1: List Available Voices
bash
curl --request GET \
--url https://api.creatify.ai/api/voices/ \
--header "X-API-ID: $CREATIFY_API_ID" \
--header "X-API-KEY: $CREATIFY_API_KEY"Response (partial):
json
[
{
"id": "voice-uuid-001",
"name": "Friendly Female",
"language": "en-US",
"accent": "American",
"gender": "female"
},
{
"id": "voice-uuid-002",
"name": "Professional Male",
"language": "en-GB",
"accent": "British",
"gender": "male"
}
]TIP
Use the paginated endpoint GET /api/voices/paginated/ for large voice lists with pagination support.
Step 2: Create a TTS Task
bash
curl --request POST \
--url https://api.creatify.ai/api/text_to_speeches/ \
--header "Content-Type: application/json" \
--header "X-API-ID: $CREATIFY_API_ID" \
--header "X-API-KEY: $CREATIFY_API_KEY" \
--data '{
"text": "Welcome to our product demonstration. Today we will explore the features that make our solution stand out from the competition.",
"voice_id": "voice-uuid-001"
}'Key parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The text to convert to speech |
voice_id | string | Yes | Voice ID from the voices list |
Response:
json
{
"id": "tts-task-uuid",
"status": "pending"
}Step 3: Poll for Completion
bash
curl --request GET \
--url https://api.creatify.ai/api/text_to_speeches/tts-task-uuid/ \
--header "X-API-ID: $CREATIFY_API_ID" \
--header "X-API-KEY: $CREATIFY_API_KEY"Completed response:
json
{
"id": "tts-task-uuid",
"status": "done",
"output": "https://cdn.creatify.ai/audio/tts-output.mp3",
"duration": 12.5
}Step 4: Download Audio
Download the audio file from the output URL.
Voice Cloning
You can also clone a voice from an audio sample:
bash
curl --request POST \
--url https://api.creatify.ai/api/voices/clone/ \
--header "Content-Type: application/json" \
--header "X-API-ID: $CREATIFY_API_ID" \
--header "X-API-KEY: $CREATIFY_API_KEY" \
--data '{
"name": "My Custom Voice",
"audio_url": "https://example.com/voice-sample.mp3"
}'WARNING
Voice cloning requires a clear audio sample of 30 seconds or longer for best results.
Credit Cost
| Operation | Credits |
|---|---|
| List voices | 0 |
| Create TTS task | Varies |
| Clone voice | Varies |
Verification Checklist
- [ ] Selected voice matches desired language, accent, and gender
- [ ] Task creation returns
pendingstatus - [ ] Final status is
donewith valid output URL - [ ] Audio is clear and natural-sounding
- [ ] Pronunciation is correct for key terms
- [ ] Audio duration is appropriate for the text length
See Also
- AI Avatar v1 SOP -- Use TTS audio in avatar videos
- AI Scripts SOP -- Generate scripts to feed into TTS
- Voices Quick Reference -- Full voice endpoint listing