Skip to content

POST /v1/normalize POST

POSThttps://api.vartalaap.si/v1/normalize

What the engine will say, without synthesising. Same key check as /v1/tts; free; nothing is logged to usage.

request.http
POST /v1/normalize
x-api-key: vt_live_…
content-type: application/json

{"text": "आपका OTP 482913 है। Payment 15/11/2026 तक करना होगा।", "digits": "hi"}

```js title="tts.mjs"on { "normalized": "आपका O T P चार आठ दो नौ एक तीन है. payment पंद्रह नवंबर दो हज़ार छब्बीस तक करना होगा.", "chars": 85, "chunks": [{"text": "आपका O T P चार आठ दो नौ एक तीन है. payment पंद्रह नवंबर दो हज़ार छब्बीस तक करना होगा.", "tokens": 22}] }

| Field | | |
|---|---|---|
| `text` | string, required | ≤ 4 000 characters |
| `digits` | `hi` (default) · `mixed` · `en` | Hinglish voices: how numbers are read (see `POST /v1/tts`). Ignored for English (US) and English (IN) voices. |
| `voice` | string, optional | Picks the normaliser: an English (US) voice (`kiara`, …) previews the English normaliser, an English (IN) voice (`ananya`, …) the English (IN) one, any Hinglish voice (or none) the Hinglish one. |
| `en_digits` | bool | legacy alias for `"digits": "mixed"` |

For an English (US) voice the reply looks like
```js title="tts.mjs"on
{"normalized": "Your one time password is four eight two nine one three. It expires in ten minutes.", "digits": "en", "language": "en", "chars": 86, "chunks": [{"text": "…", "tokens": 20}]}

chunks is how the text will be split for synthesis (≤ 50 tokens each, on sentence boundaries), with the token count per chunk; the first chunk's length is what determines a cold time-to-first-audio.

Errors: 400 text is empty, 413 text longer than 4000 characters, 401. Rules and the canonical cases: Text normalisation.