WS /v1/ws or WS /v1/ws/systemone. Call it from your server with your API key, and send only value to the page. The route is served beside the sockets, so it is not in the OpenAPI schema.
200 with the secret:
Request body
The body is optional. With no body, the secret is good for 600 seconds.expires_after
object, optional, default: 600 seconds from now.
Response
Open a socket with the secret
Offer the secret as a WebSocket subprotocol, besidevlmrun.realtime:
Browser
vlmrun.realtime subprotocol and never echoes the secret. A server-side client can also send the secret as Authorization: Bearer ek_....
- The secret is its caller. A socket opened with it has the plan, session caps, and billing of the API key that minted it.
- One secret, many sockets. A secret opens any number of sockets until
expires_at, so a page can reconnect on it. The expiry bounds the upgrade only: a socket opened in time runs its full session. - Only a client secret goes in the subprotocol. The
Sec-WebSocket-Protocolheader can be logged by a proxy, so an API key or a JWT invlmrun.bearer.*is a401. The one exception is the anonymous key on/v1/ws,vlmrun.bearer.vlmrun. See Anonymous sessions. - Expired or unknown secrets are a
401at the upgrade. Mint another one.
Errors
Related
Webcam from the Browser
A page that mints a secret on your server and streams the camera to the Gateway.
WS /v1/ws reference
Every event on the frames socket.