Browse docs

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.

Required headers
Authorization: Bearer vr-sk-...
Content-Type: application/json

Secret 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.

Realtime handshake
GET wss://api.voiceopenrouter.com/v1/realtime?session_id=vs_EXAMPLE
Authorization: Bearer vr-sk-...
Sec-WebSocket-Protocol: vor-realtime-v1

The 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.

FieldTypeDescription
typerequiredstring
audio/pcm
Raw PCM media type; do not send WAV headers.
encodingrequiredstring
pcm16le
Signed 16-bit little-endian samples.
sample_rate_hzrequiredinteger
24000
24,000 samples per second.
channelsrequiredinteger
1
Mono audio.
frame sizerequiredbytes
≤ 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