Conversations
A conversation keeps its settings and history. Each question is a turn: send text or a recording, and read the reply as it is produced, text and 24 kHz audio together.
POST
https://borminto.com/api/v1/voice/conversations/{conversation}/turns
Create a conversation
POST /api/v1/voice/conversations returns 201 with conversation_id. Read it back with GET /api/v1/voice/conversations/{conversation}.
settings.languagestring · optional- Such as
ar-EGoren-US.GET /api/v1/voice/capabilitieslists them all. settings.voicestring · optional- A voice from the capabilities response.
settings.modestring · optionalboth,textorvoice.settings.knowledge, settings.contextstring · optional- Up to 12,000 characters each. The assistant answers from this text.
settings.toolstring · optional- A tool name. The assistant asks your app with
tool.requestand waits up to 15 seconds. metadataobject · optional- Up to 2 KB, private to your server. Sent to your resolver.
Ask a question
Idempotency-Keyheader · required- 8 to 80 letters, digits, underscores or hyphens. A retry with the same key returns the finished reply without audio, or
turn.pendingwhile it still runs. textstring · one of- The question, up to 2,400 characters.
audiofile · one of- A recording as multipart form data, up to 30 seconds and 1 MB.
replystring · optional- Speak these exact words instead of generating a reply.
Events
| Event | Meaning |
|---|---|
turn.started | The question was accepted. |
transcript.done | What the caller said, as text. |
text.delta, audio.delta | Reply text, and base64 PCM16 audio at 24 kHz. The waiting sentence has "filler": true. |
tool.request | Answer with POST …/tool-result and turn_id, result, optional reply, within 15 seconds. |
response.done | The reply finished, with its full text. |
response.error | The question failed: see code, such as no_speech or voice_capacity with retry_after. |
turn.pending | A retry of a question that is still running. Send it again a moment later. |
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. |
| 409 | idempotency_conflict | The same Idempotency-Key was sent with different input. Use a new key for new input. |
| 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. |