Subspace Institute

Cartesia TTS API

Generates speech audio from the provided text using Cartesia's Text-to-Speech service

POST
/tts-cartesia
textstring
Length1 <= length <= 10000
voice?string

The ID of the voice to use

Default"f9a4b3a6-b44b-469f-90e3-c8e19bd30e99"
model?string

The ID of the model to use for the generation

Default"sonic-2"
tokenstring

Cartesia API key for authentication

Length1 <= length
language?string

The language that the given voice should speak the transcript in

Default"zh"
Value in"en" | "fr" | "de" | "es" | "pt" | "zh" | "ja" | "hi" | "it" | "ko" | "nl" | "pl" | "ru" | "sv" | "tr"
duration?number

The maximum duration of the audio in seconds

Range0 < value
speed?string

Speed setting for the model

Default"normal"
Value in"slow" | "normal" | "fast"
pronunciation_dict_ids?array<string>

A list of pronunciation dict IDs to use for the generation

output_format?object & object & object

Audio output format configuration

Default{"container":"mp3","bit_rate":64000,"sample_rate":44100}

Response Body

curl -X POST "https://edge-workers.laplace.cn/laplace/tts-cartesia" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, world!",
    "token": "string"
  }'
null
{
  "success": false,
  "message": "string"
}
{
  "success": false,
  "message": "string"
}