BashBrainTeammatesPricingDevelopersGet a test key

Sessions

Bash in a browser: its live screen, a voice call, or the whole of Bash inside your app.

Send Authorization: Bearer vk_test_... on every call. Every route of Sessions.

POST/v1/sessions/{session_id}/voiceCalled from the user's browser with the session's token and its WebRTC offer; answers the model's answer.

Audio then flows straight to the voice model, and everything said lands in the session's conversation. For a session opened with voice.

A session's token. On the card: talk. Every call here is a checked sample.

Request2 fields

Path

session_idstringrequiredThe session's id (ses_...).
Type
string

Body

sdpstringrequiredThe browser's WebRTC offer (its SDP), in at most 65,536 characters.
Limits
1 to 65536 characters.
Answers 2013 fields
object"session_voice"Always session_voice.
Type
"session_voice"
sdpstringThe answer to the browser's offer (its SDP): hand it to the browser's connection.
Type
string
voicestringThe voice Bash speaks in.
Type
string
HTTP
# Call in an existing conversation. Open the session's url, and the page joins the call.curl "$VESTRA_BASE_URL/v1/sessions" \  -H "Authorization: Bearer $VESTRA_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "user_id": "traveller-42", "conversation_id": "conv_8f2k", "voice": true }' # Connect your own voice client. The session's page does this for you: it sends the browser's WebRTC offer# with the session's own token, and gets the answer back. Call it yourself only if you build your own client.curl "$VESTRA_BASE_URL/v1/sessions/ses_8h2/voice" \  -H "Authorization: Bearer $SESSION_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "sdp": "the WebRTC offer from the browser" }'
MCP
{  "method": "tools/call",  "params": {    "name": "talk",    "arguments": { "user": "traveller-42", "conversation": "conv_8f2k" }  }}
HTTP

No sample in your language for this route, so here it is over HTTP.

# Call in an existing conversation. Open the session's url, and the page joins the call.curl "$VESTRA_BASE_URL/v1/sessions" \  -H "Authorization: Bearer $VESTRA_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "user_id": "traveller-42", "conversation_id": "conv_8f2k", "voice": true }' # Connect your own voice client. The session's page does this for you: it sends the browser's WebRTC offer# with the session's own token, and gets the answer back. Call it yourself only if you build your own client.curl "$VESTRA_BASE_URL/v1/sessions/ses_8h2/voice" \  -H "Authorization: Bearer $SESSION_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "sdp": "the WebRTC offer from the browser" }'