Swap models by changing the URL
Every request uses the same base URL. The only part that changes is the model path:
Authentication, request body, and response format are identical. Only the path differs.
Why a unified interface
Most voice AI stacks lock you into one provider’s SDK, request format, and response structure. The Unified API removes that friction.
Common patterns:
- A/B testing: route a percentage of traffic to a different model path with no code change.
- Failover: switch providers by changing the model path; request format and error handling stay the same.
- Latency optimization: deploy across regions and route each one to the lowest-latency model.
- Rapid prototyping: try a new model by changing the URL.
config object. See Parameters coverage for the full list.
Works over HTTP and WebSocket
The same model path works with both protocols:
Use HTTP for batch jobs and file conversion. Use WebSocket for real-time streaming and voice agents. See HTTP vs. WebSocket for details.
Get started
Prerequisites
- An SLNG key (get one here)
curlinstalled (or any HTTP client)
Authentication
All requests require a Bearer token:Text-to-Speech
Generate speech from text. Here’s a request using Rime Arcana v3:config object.
To make acronyms, product names, and domain terms speak consistently across TTS models, attach a pronunciation dictionary to the request.
The model is inferred from the URL path. Do not include a duplicate
model field in the request body unless an endpoint reference explicitly requires it.Speech-to-Text
Transcribe audio with SLNG-hosted Deepgram Nova 3:WebSocket streaming
The same model paths work over WebSocket for real-time streaming. Connect towss:// instead of posting to https://.
The browser WebSocket API does not support custom headers. Pass the SLNG key as a query parameter or use a server-side WebSocket client. The example below uses the Node.js
ws library.Next steps
Parameters coverage
See which parameters each provider supports.
Supported models
Browse all models available through the Unified API.
HTTP vs. WebSocket
When to use each protocol and their trade-offs.