Skip to content

Text-to-Speech Engine

This API converts text into natural-sounding speech audio. Instead of streaming raw binary data, this API generates the audio, hosts it in the cloud, and returns a direct MP3 link. This makes it perfect for Bots, HTML5 players, mobile apps, and other applications.

POST /api/v1/tts

The following parameters are accepted in the request body:

FieldTypeRequiredDescription
textstringYesThe text to convert (Max ~200 chars recommended).
langstringOptionalLanguage code (Default: en). Examples: fr, es, ja, id.
Terminal window
curl -X POST https://heavstal.com.ng/api/v1/tts \
-H "Content-Type: application/json" \
-H "x-api-key: <YOUR_API_KEY>" \
-d '{"text": "Bonjour le monde", "lang": "fr"}'
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"text": "Bonjour le monde",
"language": "fr",
"url": "https://files.catbox.moe/abc1234.mp3",
"mimetype": "audio/mpeg"
}
}