https://api.sempera.org/openapi.json is the machine-readable contract, generated from the running route table.
Connecting a browser to a Web voice session today
- Your server calls
POST /v1/sessionswith your API key and receives{"url", "token", "expires_at"}, plus atransportfield that names the realtime media protocol theurlandtokenare for. - Your page connects with an open-source realtime-media web client for that protocol. This page does not name the client library or version Sempera has tried; write to hello@sempera.org if you need them. The sketch below shows the shape any such client has. It is not a package to install:
- The agent joins the room and speaks; audio tracks arrive as remote participants. When the conversation ends, disconnect and read
GET /v1/sessions/{id}for the transcript.
web_voice, the join token expires after five minutes. expires_at is the token’s actual expiry, not the maximum length of an already connected conversation. Keep your API key on your server and issue a session only after checking your own customer’s identity and authorization.
Compatibility note: POST /v1/sessions web voice join tokens now use a five-minute window instead of the media default. Request a fresh session if the visitor has not joined by expires_at. App Talk and simulator tokens are unchanged. This join window is separate from a connected call’s duration.