Skip to content

Generate Tts

POST
/api/tts/generate
curl --request POST \
--url https://example.com/api/tts/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "text": "You were supposed to wait for my signal.", "character": "example", "project": "example", "voice_id": "example", "voice_settings": { "stability": 0.4, "style": 0.5 }, "filename_prefix": "voice/line-01" }'

Speak a line and land it in the output dir as a wav.

This is the front of the voiced-clip flow: pass the returned audio straight to POST /api/video/generate with an InfiniteTalk workflow, which bakes the voice in as lip-sync. Laying audio over a finished clip at assembly time is the wrong end — the mouth won’t match.

Media typeapplication/json
TTSGenerateRequest
object
text
required
Text

The line to speak.

string
>= 1 characters
character
Any of:
string
project
Any of:
string
voice_id
Any of:
string
voice_settings
Any of:
object
key
additional properties
any
filename_prefix
Any of:
string

Successful Response

Media typeapplication/json
TTSGenerateResponse
object
ok
required
Ok
boolean
audio
required
Audio

Output path to pass as audio to POST /api/video/generate

string
audio_url
required
Audio Url
string
duration
Any of:
number
voice_id
required
Voice Id
string
Examplegenerated
{
"ok": true,
"audio": "example",
"audio_url": "example",
"duration": 1,
"voice_id": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}