Node SDK
Build speech-to-text and text-to-speech workflows in Node with async and real-time APIs.
The Soniox Node SDK gives you fully typed access to our Async and Real-time Speech-to-Text APIs and Text-to-Speech APIs.
Quickstart
Install
Install via your preferred package manager:
Set your API key
Get API key
Create a Soniox account and log in to the Console to get your API key.
See all available environment variables in the SDK reference.
Environment variables
The client reads the following env vars as fallbacks when the matching client option is not provided:
| Variable | Maps to option |
|---|---|
SONIOX_API_KEY | api_key |
SONIOX_REGION | region |
SONIOX_BASE_DOMAIN | base_domain |
SONIOX_API_BASE_URL | base_url |
SONIOX_WS_URL | realtime.ws_base_url |
SONIOX_TTS_API_URL | tts_api_url |
SONIOX_TTS_WS_URL | realtime.tts_ws_url |
Resolution precedence: explicit option → env var → base_domain → region → US root default. region is shorthand for base_domain: '{region}.soniox.com', so setting it resolves every host family (api.*, stt-rt.*, tts-rt.*) to the regional variant. See Full SDK reference → Environment variables for the full table and notes.
Client options
The client also accepts options for selecting a regional endpoint or overriding individual service URLs. All fields are optional — see SonioxNodeClientOptions for the full type.
Create your first real-time session
Learn more about Real-time transcription.
Create your first async transcription
Learn more about Async transcription.
Generate your first speech
Learn more about REST speech generation and Real-time speech generation.
Next steps
- Real-time transcription
- Async transcription
- Real-time speech generation
- REST speech generation
- Webhooks
- Files and models
- Full SDK reference