Live calls
Talk in real time. Your server asks for a one-time ticket; your app opens a WebSocket or WebRTC connection with it and streams the microphone.
https://borminto.com/api/v1/voice/conversations/{conversation}/connect
- Get a ticket
Send
transport:websocketorwebrtc. The ticket works once, for 45 seconds, and the response gives thepathto open. - Connect
WebSocket: open the path with the subprotocols
borminto.voice.v1and the ticket. WebRTC: post your SDP offer to the path with the ticket as a Bearer token, then open theborminto.voice.v1data channel. - Talk
After
connection.ready, send mono 16 kHz PCM16. A question is sent after about one second of silence; sendspeech_pause_ms: 3200for longer pauses. - End
DELETE /api/v1/voice/conversations/{conversation}/connection.POST …/stopstops the current reply.
Connect fields
transportstring · requiredwebsocketorwebrtc.greetingstring · optional- Up to 300 characters, spoken once after
connection.ready. speech_pause_msinteger · optional950or3200.settings, metadataobject · optional- Change the conversation settings or metadata for this call.
One call per conversation at a time: a second one returns 409. Call time counts from connection.ready until the call ends. Rotating or revoking the key ends its calls.
Errors
| Status | Code | What to do |
|---|---|---|
| 401 | authentication_required | The key is missing or revoked. Send a current bv_ key. |
| 402 | allowance_exhausted | The allowance has been used. allowance_expired means the plan has ended. |
| 403 | application_suspended | The application is suspended. Contact the administrator. |
| 410 | connection_ended | The call, session or saved result has ended. Start a new one. |
| 422 | invalid_request | A field, the audio or the Idempotency-Key is not valid. Audio problems use codes such as no_speech or audio_too_long. |
| 429 | rate_limited | Too many requests. Wait for Retry-After seconds. |
| 503 | voice_unavailable | Temporarily unavailable. Retry after Retry-After with the same Idempotency-Key. |
| 409 | conversation_connected | A call is already connected to this conversation. End it first. |