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

HTTP Streaming

POST /v1/tts/stream synthesizes the full input text and streams the audio bytes back as they are generated, over one HTTP response. This lowers time-to-first-byte compared to waiting for the complete file.
The request body is identical to POST /v1/tts/generate. Authentication, rate limits, credits, voice/language, and model_id are all validated before streaming starts.
pcm is the recommended output_format for streaming since it has no container overhead and is ready for custom playback pipelines.

Response

The response body is application/octet-stream. Usage metadata is returned in headers:
X-RateLimit-Limit: 15 X-RateLimit-Remaining: 13 X-RateLimit-Reset: 1715678460 X-Characters-Used: 12 X-Audio-Duration-Seconds: 1.8

Streaming to a file

with open("speech.pcm", "wb") as file: for chunk in client.tts.stream( text="வணக்கம், நான் வாக்யம் AI பேசுகிறேன்.", model_id="raaga-v1", voice="Archana", language="ta-IN", output_format="pcm", ): file.write(chunk)

Collecting the full stream with metadata (Python)

If you want the complete audio plus the response metadata in one call, the Python SDK offers stream_to_bytes:
Python
streamed = client.tts.stream_to_bytes( text="வணக்கம்.", model_id="raaga-v1", voice="Archana", language="ta-IN", ) streamed.save("speech.pcm") print(streamed.metadata.characters_used) print(streamed.metadata.duration_seconds)

When to use streaming vs. realtime

  • HTTP streaming is best when you have the full text up front and want the audio to start playing sooner.
  • WebSocket is best when you produce text sentence-by-sentence (for example from an LLM) and want each sentence synthesized as it arrives. See the realtime guide.