TTS API v1.0.0

Express Text-To-Speech Service

A fast, secure, and production-ready TypeScript API to convert text paragraphs into high-quality speech MP3 files.

Interactive Playground

Live Test
MP3 Audio (128kbps)

Authentication

The API expects a secret key to authenticate requests. You can authorize your requests in three flexible ways:

1. Custom Header x-api-key: YOUR_KEY
2. Authorization Header Authorization: Bearer YOUR_KEY
3. Query Parameter GET /api/tts?key=YOUR_KEY&...

Endpoints Reference

GET /api/tts

Suitable for embedding directly into HTML <audio> source streams.

PARAM TYPE DESC
key String API key (Required if header empty)
text String Paragraph to speak (Required)
lang String Language code. Default: vi
POST /api/tts

Ideal for larger texts from frontends or backends. Expects JSON body.

{
  "text": "Hello World!",
  "lang": "en"
}