Skip to main content
POST
cURL
Estimate the cost of a text-to-speech job before submitting it.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept
enum<string>
default:application/json
required
Available options:
application/json

Body

application/json

Audio generation parameters. Either text or count_text must be provided. Voice is optional (not needed for voice_clone or voice_design modes).

model
string
required

The model to use for speech generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.

Example:

"Kokoro"

lang
string
required

Language to be used during audio generation

Example:

"en-us"

speed
number
required

Generated audio speech speed

Example:

1

format
string
required

Audio output format

Example:

"mp3"

sample_rate
number
required

Sample rate of generated audio

Example:

24000

text
string | null

Text to be converted to speech. Either this or count_text must be provided.

Example:

"A beautiful sunset over mountains"

count_text
integer | null

Number of characters for price calculation. Either this or text must be provided.

Example:

1000

mode
enum<string> | null

TTS mode: custom_voice (default), voice_clone, or voice_design.

Available options:
custom_voice,
voice_clone,
voice_design
Example:

"custom_voice"

voice
string | null

Name of the voice to be used. Only relevant for custom_voice mode.

Example:

"af_sky"

instruct
string | null

Natural language voice description for voice_design mode price calculation.

Response

Calculated price for text2audio inference.

data
object