Requirements
- An API key from the Smallest AI Console
- For Python:
requests(orsmallestaifor the SDK) - For JavaScript: Node.js 18+ (built-in
fetch)
Synchronous Text to Speech
Send text, receive complete audio in the response:Asynchronous Text to Speech
For concurrent requests (e.g., generating multiple audio files in parallel):Parameters
You can override any parameter per request:
When to Use Each Mode
- Synchronous: Real-time voice assistants, chatbot responses, single audio generation
- Asynchronous: Batch processing, generating multiple audio files, audiobook chapters, concurrent API calls

