Installation
Quick Start
Configuration
API Reference
startTTS(payload, options?)
Starts an async TTS generation job. Returns immediately with a generation_id.
Options:
getStatus(generationId, options?)
Check the status of a generation.
TTSResponse with status, audio_url, voice_id, model, etc.
generateTTS(payload, options?)
Convenience method: starts TTS and polls until completion. Returns the audio URL.
signal, customEndpointSlug):
getVoices(params?, options?)
List available voices with optional filtering.
getHistory(params?, options?)
Retrieve generation history.
TypeScript Types
The SDK exports all types for full type safety:Key Type Definitions
Error Handling
The SDK provides typed errors for all API failures:Error Codes
Request Cancellation
UseAbortSignal to cancel in-flight requests: