Skip to content

Text-to-Speech (TTS) ​

Generate AI-powered audio from text using Replicer AI 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: Sarah). See Voices
languagestringNoLanguage code, e.g. en, it, es (default: en)
speednumberNoPlayback speed, 0.25 – 4.0 (default: 1.0)
stabilitynumberNoVoice stability, 0 – 1 (default: 0.4)
similarityBoostnumberNoSimilarity boost, 0 – 1 (default: 0.75)
stylenumberNoStyle exaggeration, 0 – 1 (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.4,
    "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

When processing fails, the generation status becomes failed and errorMessage is set. Common values include voice_not_found, insufficient_balance, worker_unavailable, upload_failed, and provider_transient_error.


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.4,
    "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

errorMessage values (failed generations) ​

ValueDescription
voice_not_foundThe voice value is not a known alias and is not a valid voice ID in your library
insufficient_balanceOrganization token balance is too low
worker_unavailableTTS worker could not be reached
upload_failedAudio was generated but could not be stored
provider_transient_errorTemporary provider error — safe to retry
provider_error_*Permanent provider HTTP error

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)
statusstring—Filter 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.4,
      "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 pass any supported voice ID (20-character alphanumeric) from your voice library.

Standard voices (English) ​

Female ​

IDNameDescription
AriaAriaClear, natural voice
SarahSarahMature, reassuring
RachelRachelWarm, calm voice
ArabellaArabellaMysterious, emotive
HopeHopeBright, conversational
AlexandraAlexandraConfident, conversational
PriyankaPriyankaLate-night radio cadence
MonikaMonikaMultilingual, popular
JuniperJuniperGrounded professional
BlondieBlondieConversational variant
DomiDomiStrong, dynamic

Male ​

IDNameDescription
RogerRogerConfident narrator
GrimblewoodGrimblewoodDeep, characterful
DrewDrewCasual, relatable
PaulPaulSteady, trustworthy
ClydeClydeGruff, characterful
DaveDaveFriendly, approachable
FinFinCrisp, clear
JamesJamesHusky, engaging
BradfordBradfordExpressive, articulate
ReginaldReginaldIntense, villain
MarkMarkConversational
AustinAustinSouthern American gentleman

Custom voices (Italian) ​

IDNameAccentDescription
LorenzoLorenzoItalianoYouthful modern pro voice
RobertaRobertaRomanescoPersuasive young voice
SashaSashaToscanoNatural, layered Tuscan
GiusyGiusySicilianoSales / customer support
VeraVeraMilaneseCalm, influential conversational
VittorioVittorioMilaneseBelievable guy-next-door

Custom voice IDs

Integrators may pass a raw voice ID (20-character alphanumeric) in the voice field instead of a built-in alias. The ID must exist in your organization's voice library.


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