Get started
Authentication
Authenticate every protected HTTP request and realtime upgrade with a VoiceOpenRouter secret key.
HTTP requests
Send the bearer key in the Authorization header.
Authorization: Bearer vr-sk-...
Content-Type: application/jsonSecret key format
Use the VoiceOpenRouter key issued for the owning project. The key is scoped by ownership and model permissions.
Ownership checks
Session reads, realtime upgrades, and termination require the same owner boundary as session creation.
WebSocket upgrades
Authentication is checked before the HTTP request is upgraded.
GET wss://api.voiceopenrouter.com/v1/realtime?session_id=vs_EXAMPLE
Authorization: Bearer vr-sk-...
Sec-WebSocket-Protocol: vor-realtime-v1The session_id must belong to the key in the Authorization header. An invalid key returns HTTP 401 and does not create a session or wallet reservation.
Public audio invariants
The same negotiated format is used for inbound and outbound audio.
| Field | Type | Description |
|---|---|---|
typerequired | stringaudio/pcm | Raw PCM media type; do not send WAV headers. |
encodingrequired | stringpcm16le | Signed 16-bit little-endian samples. |
sample_rate_hzrequired | integer24000 | 24,000 samples per second. |
channelsrequired | integer1 | Mono audio. |
frame sizerequired | bytes≤ 98,304 | Aligned PCM16LE frames; 20–100 ms is the normal client range. |
What the public API never returns
Provider-specific implementation details stay behind the unified boundary.
- Provider endpoint URLs or API keys
- Provider event names or binary framing headers
- Private room tokens or upstream payloads
- Unbounded raw audio or transcript content in errors