Beta
Realtime calls API
Browse documentation
Realtime calls
POST /v1/calls mints a short-lived ticket (TTL 300 s) the browser uses to connect media directly to the GPU box. With transport.sdp present the create is one-shot — the SDP answer comes back in the 201 (the OpenAI Live shape).
The offer goes to call_url with the x-call-token header; DELETE hangs up. WebSocket clients dial ws_url instead of using ice_servers. GET /v1/calls returns your server-verified history.
POST /v1/calls
agent_idstring?The stored agent to run; inline prompt+voice works too.
promptstring?Inline persona when you don't use a stored agent.
transportobjectEither {"type": "webrtc", "sdp": "<offer>"} for one-shot, {"type": "webrtc"} for a ticket, or {"type": "websocket"}.
recordingboolean?Default false; requires consent surfaces on your side.
settingsobject?Per-call runtime overrides of the agent's CallSettings.
| Field | Type | Notes |
|---|---|---|
| agent_id | string? | The stored agent to run; inline prompt+voice works too. |
| prompt | string? | Inline persona when you don't use a stored agent. |
| transport | object | Either {"type": "webrtc", "sdp": "<offer>"} for one-shot, {"type": "webrtc"} for a ticket, or {"type": "websocket"}. |
| recording | boolean? | Default false; requires consent surfaces on your side. |
| settings | object? | Per-call runtime overrides of the agent's CallSettings. |
POST /v1/calls/{call_id}
DELETE /v1/calls/{call_id}
GET /v1/calls
curl -X POST https://api.sawtakarabi.ai/v1/calls \ -H "Authorization: Bearer $SAWTAK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"agent_id": "<agent_id>", "transport": {"type": "webrtc"}}'