Skip to content

Text to Speech

Fresh

Purpose

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:

ParameterTypeRequiredDescription
textstringYesThe text to convert to speech
voice_idstringYesVoice 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

OperationCredits
List voices0
Create TTS taskVaries
Clone voiceVaries

Verification Checklist

  • [ ] Selected voice matches desired language, accent, and gender
  • [ ] Task creation returns pending status
  • [ ] Final status is done with 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