Build with Realtime TTS
Synthesize Speech
Send up to 2,000 characters and receive the complete audio in a single HTTP response
The non-streaming API is the simplest way to synthesize a short piece of text: send one request and receive the complete audio in one HTTP response. It accepts up to 2,000 characters per request.
The server generates the entire audio before returning it, so playback starts later than with a streaming method. Use this API when a simple, one-shot integration matters more than latency or input size. For most other use cases, choose one of the methods below.
Choose a synthesis method
| If you need | Use | Why |
|---|---|---|
| The lowest possible latency | WebSocket API | Reuses a persistent connection and streams audio chunks as they are generated. |
| Low latency with a simpler integration | Streaming API | Streams audio over HTTP and accepts up to 4,000 characters per request. |
| A drop-in replacement for OpenAI text-to-speech | OpenAI compatibility | Works with the OpenAI SDKs once the base URL, API key, model, and voice point at Inworld, and streams audio like the Streaming API. |
| Long-form audio such as audiobooks, podcasts, or voiceovers | Async API | Accepts up to 100,000 characters per job and returns the result after background generation. On-Demand accounts are capped at 10,000 characters per job. |
| Lower-cost generation that can finish later | Batch API | Costs 20% less per character and processes many independent requests in the background. |
| The simplest integration for short text | Synthesize Speech | Returns the complete audio in one response, with a 2,000-character request limit. |
See the latency best practices for more ways to reduce time to first audio.
Code Examples
Node.js SDK
Use generate() from the @inworld/tts SDK — handles chunking, retries, and encoding automatically.
JavaScript
View our JavaScript implementation example
Python SDK
Use generate() from the inworld-tts SDK — handles chunking, retries, and encoding automatically.
API Reference
Synthesize Speech
View the complete API specification