Realtime Tokens — Removed
Removed in MVP
The legacy POST /v1/realtime/token and POST /v1/webrtc/token endpoints have been removed. They now respond with 410 Gone and a migration payload pointing at the canonical Calls API.
{
"error": "Gone",
"code": "realtime_token_removed",
"message": "POST /v1/realtime/token has been removed. Initiate WebRTC sessions via POST /v1/calls with a webrtc participant.",
"migration_url": "https://docs.rymi.io/api/calls#webrtc"
}Why the change
/v1/realtime/token minted LiveKit credentials and inserted bare calls rows directly, bypassing the credit, quota, admin-pause, and publishable-key channel checks enforced by POST /v1/calls. Routing browser/SDK voice sessions through /v1/calls keeps every call subject to the same gates.
How to migrate
Send a single request to POST /v1/calls with a webrtc participant. The response includes the same LiveKit credentials the legacy route returned, alongside the canonical call_id and any participant rows you'd otherwise have to backfill.
curl -X POST https://api.rymi.live/v1/calls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "550e8400-e29b-41d4-a716-446655440000",
"participants": [
{ "transport": "webrtc", "identity": "browser" }
],
"metadata": { "source": "web-app" }
}'The participants[0].access block in the response contains the LiveKit credentials:
{
"id": "9b3a4b7c-...",
"room_name": "call_9b3a4b7c-...",
"status": "queued",
"participants": [
{
"id": "...",
"transport": "webrtc",
"identity": "browser",
"status": "joining",
"access": {
"url": "wss://livekit.rymi.live",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
]
}Use access.url and access.token exactly where you previously used server_url and client_token.
import { Rymi } from '@rymi/web';
const call = Rymi.createCall({
url: response.participants[0].access.url,
token: response.participants[0].access.token,
});
call.on('started', () => console.log('Connected'));
await call.connect();See the full Calls API reference for the request/response schema, including credit gating, publishable-key channel scoping, and admin-pause behaviour.
Turn-taking and speech boundary detection
WebRTC sessions go through the same hosted agent runtime as PSTN sessions, so the agent's configured turn detector applies to both. Pick a mode by Rymi-native name — steady, balanced, sensitive, or provider — using the agent's advanced turnDetectorMode field. Engine labels (rms, webrtc, silero, provider-signal) are accepted as compatibility aliases and are not the preferred public language.
| Mode | Engine on hosted runtime | When to use |
|---|---|---|
steady | RMS, no native dependency | Default. Conservative, no extra installs. |
balanced | Native WebRTC VAD when available, PCM fallback | General-purpose latency/false-alarm tradeoff. |
sensitive | ONNX Silero when available, PCM fallback | Catches brief utterances and partials more aggressively. |
provider | Provider/recognizer speech-boundary signals | STT emits the turn boundary directly. |

