Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

HTTP Generation

POST /v1/tts/generate synthesizes your full text and returns the complete audio in one JSON response. This is the simplest way to generate speech — use it when you have the whole text up front and don't need to start playback before synthesis finishes. For lower time-to-first-byte, see HTTP streaming or the realtime WebSocket guide.

Request

Send text, model_id, voice, and language. output_format, sample_rate, and speed are optional.
from vakyamai import VakyamAI client = VakyamAI() response = client.tts.generate( text="வணக்கம், நான் வாக்யம் AI பேசுகிறேன்.", model_id="raaga-v1", voice="Archana", language="ta-IN", output_format="mp3", # mp3 | wav | pcm | mulaw speed=1.0, # 0.5 - 2.0 ) response.save("speech.mp3")

Response

The response is a JSON envelope with base64-encoded audio and metadata:
{ "audio": "SUQzBAAAAAAA...", "format": "mp3", "duration_seconds": 2.4, "characters_used": 36 }
Decode the audio field to get the raw audio bytes. The SDKs do this for you (response.audio in Python, speech.audioBytes in JavaScript). With cURL:
echo "<base64-audio>" | base64 --decode > speech.mp3

Notes

  • Maximum 3000 Unicode characters per request.
  • voice + language must be a valid pair — see Voices & languages.
  • output_format accepts mp3 (default), wav, pcm, or mulaw.
  • sample_rate accepts 8000, 16000, 24000 (default), or 48000 Hz.
  • The full request and response schema is in the API reference.