Estimate synthesis cost
estimate_costCalculate Telnyx text-to-speech list-price cost from a character count, text, or full [PAUSE n] script before rendering, avoiding API calls for long scripts.
Instructions
Estimates the list-price cost for a character count, a text or a full [PAUSE n] script — without calling the Telnyx API. Use this before rendering long scripts.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"voice": "<voice>"
},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text whose length should be priced. | |
| voice | Yes | Voice id in Provider.Model.VoiceId format, e.g. "Telnyx.Ultra.Clara" or "aws.Polly.Vicki". | |
| script | No | Markdown script with [PAUSE n] markers; only the spoken characters are counted. | |
| max_chars | No | ||
| characters | No | Character count to price. Provide this or "text"/"script". |