Realtime

Open a realtime session over a WebSocket, with your key in a subprotocol or a header.

javascript
// A browser cannot set headers on a WebSocket, so the key rides in a subprotocol.const ws = new WebSocket("wss://api.blastrouter.com/v1/realtime?model=gpt-realtime", [  "realtime",  "router.api-key.rl-…",]);

From a server, send the key in a credential header instead — a header always wins over the router.api-key.<key> subprotocol, so a gateway cannot bill your traffic to its own key.

The router holds the cost of the session limit when the socket opens and settles on close, per audio second in both directions.

Base URLhttps://api.blastrouter.com