Skip to content

API reference

Base URL https://api.vartalaap.si (Mumbai). JSON in, audio or JSON out. Authenticate with x-api-key (or Authorization: Bearer); see Authentication. Errors are {"error": "<message>"} with the status codes in Limits & errors.

Endpoint Purpose
POST /v1/tts POST synthesise text → chunked wav / pcm16 / opus
WS /v1/tts/stream WS many utterances on one connection, JSON events + binary audio
POST /v1/normalize POST preview the normaliser and chunking (free)
GET /v1/voices GET voices this key may use
GET /healthz, /readyz, /metrics GET liveness, readiness, Prometheus
Portal API /portal/v1/* keys, usage, billing with a portal sign-in token

GET / returns {"service":"vartalaap-tts","model":"pocket-tts-hinglish-v1","endpoints":[…]}.

Conventions

  • All text is UTF-8; Devanagari and Latin may be mixed freely.
  • Every synthesis response carries x-request-id (yours from request_id, or generated), echoed in all WebSocket events and stored in your usage log.
  • Output is always 24 kHz mono; sample_rate is accepted only as 24000.
  • CORS is enabled for browser clients; prefer short-lived keys there.
  • The source of truth is the server itself (vartalaap-tts-server, src/server.rs). This reference is kept in step with it; the changelog records changes.