Skip to content

Text-to-Speech (TTS)

Generate AI-powered audio from text using ElevenLabs voices, retrieve generation status via polling, and list past generations.

Create a TTS generation

POST /v1/tts

Submit text to be converted into speech. The generation is queued and processed asynchronously. Poll GET /v1/tts/{id} until the status is completed or failed.

Required scope: tts:write

Request body

FieldTypeRequiredDescription
textstringYesThe text to convert to speech (max 10,000 characters)
voicestringNoVoice ID or name (default: Aria). See Voices
languagestringNoLanguage code, e.g. en, it, es (default: en)
speednumberNoPlayback speed, 0.254.0 (default: 1.0)
stabilitynumberNoVoice stability, 01 (default: 0.5)
similarityBoostnumberNoSimilarity boost, 01 (default: 0.75)
stylenumberNoStyle exaggeration, 01 (default: 0)

Example

bash
curl -X POST https://api.replicer.ai/v1/tts \
  -H "Authorization: Bearer rpl_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello! This is a test of the text-to-speech API.",
    "voice": "Aria",
    "language": "en",
    "speed": 1.0,
    "stability": 0.5,
    "similarityBoost": 0.75
  }'

Response 201 Created

json
{
  "data": {
    "id": "clx9876543210",
    "status": "queued",
    "characterCount": 50
  },
  "requestId": "req-abc123"
}

Errors

CodeCause
validation_errorMissing text or text exceeds 10,000 characters
internal_errorTTS worker is unavailable

Get a TTS generation

GET /v1/tts/{id}

Retrieve the current status and details of a TTS generation. Use this endpoint to poll for completion.

Required scope: tts:read

Path parameters

ParameterTypeDescription
idstringThe TTS generation ID

Example

bash
curl https://api.replicer.ai/v1/tts/clx9876543210 \
  -H "Authorization: Bearer rpl_live_your_key"

Response 200 OK

json
{
  "data": {
    "id": "clx9876543210",
    "text": "Hello! This is a test of the text-to-speech API.",
    "characterCount": 50,
    "voice": "Aria",
    "language": "en",
    "speed": 1.0,
    "stability": 0.5,
    "similarityBoost": 0.75,
    "style": 0,
    "source": "api",
    "status": "completed",
    "audioUrl": "https://pub-xxx.r2.dev/tts/org123/clx9876543210.mp3",
    "tokenCost": 100,
    "createdAt": "2026-04-07T10:00:00.000Z",
    "completedAt": "2026-04-07T10:00:05.000Z"
  },
  "requestId": "req-def456"
}

Status values

StatusDescription
queuedGeneration is waiting to be processed
processingAudio is being generated
completedAudio is ready — audioUrl is populated
failedGeneration failed — check errorMessage

Polling strategy

Poll GET /v1/tts/{id} every 3–5 seconds until status is completed or failed.

bash
# Poll until completed
while true; do
  STATUS=$(curl -s https://api.replicer.ai/v1/tts/clx9876543210 \
    -H "Authorization: Bearer rpl_live_your_key" | jq -r '.data.status')
  echo "Status: $STATUS"
  [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ] && break
  sleep 3
done

Errors

CodeCause
not_foundGeneration doesn't exist or doesn't belong to your org

List TTS generations

GET /v1/tts

Retrieve a paginated list of TTS generations for your organization.

Required scope: tts:read

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger20Results per page (max 100)
statusstringFilter by status: queued, processing, completed, failed

Example

bash
curl "https://api.replicer.ai/v1/tts?page=1&limit=10&status=completed" \
  -H "Authorization: Bearer rpl_live_your_key"

Response 200 OK

json
{
  "data": [
    {
      "id": "clx9876543210",
      "text": "Hello! This is a test.",
      "characterCount": 23,
      "voice": "Aria",
      "language": "en",
      "speed": 1.0,
      "stability": 0.5,
      "similarityBoost": 0.75,
      "style": 0,
      "source": "api",
      "status": "completed",
      "audioUrl": "https://pub-xxx.r2.dev/tts/org123/clx9876543210.mp3",
      "tokenCost": 100,
      "createdAt": "2026-04-07T10:00:00.000Z",
      "completedAt": "2026-04-07T10:00:05.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1
  },
  "requestId": "req-ghi789"
}

Voices

The following built-in voices are available. You can also use any ElevenLabs voice ID directly.

Female voices

IDNameDescription
AriaAriaClear, natural voice
SarahSarahFriendly, conversational
RachelRachelWarm, calm voice
JaneJaneProfessional, polished
ArabellaArabellaElegant, refined
HopeHopeSoft, gentle
AlexandraAlexandraConfident, clear
PriyankaPriyankaWarm, expressive
MonikaMonikaSmooth, articulate
JuniperJuniperBright, youthful
BlondieBlondieLively, energetic
DomiDomiStrong, dynamic

Male voices

IDNameDescription
RogerRogerProfessional narrator
GrimblewoodGrimblewoodDeep, warm voice
DrewDrewCasual, relatable
PaulPaulSteady, trustworthy
ClydeClydeGruff, characterful
DaveDaveFriendly, approachable
FinFinCrisp, clear
JamesJamesAuthoritative, deep
BradfordBradfordDistinguished, formal
ReginaldReginaldClassic, refined
MarkMarkNeutral, versatile
AustinAustinEnergetic, youthful
KuonKuonCalm, smooth
GamingGamingUpbeat, dynamic

Custom voice IDs

You can use any valid ElevenLabs voice ID in the voice field. The built-in names above are shortcuts for convenience.


Billing

TTS generations consume tokens from your organization balance:

CharactersToken cost
1 – 10010 tokens
101 – 20020 tokens
201 – 30030 tokens
...10 tokens per 100 chars (rounded up)
1,000100 tokens
5,000500 tokens

Tokens are deducted when processing begins. If the generation fails, tokens are automatically refunded.

Replicer API Documentation