Palbase ai · API
POST
/ai/client/templates/{name}/voiceStart a WebRTC live voice session locked to a published voice_live template
Start a WebRTC live voice session locked to a published voice_live template.
Called by your app, with the publishable key; or a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.
Path
namestring · requiredTemplate slug name.Request body
variablesobject · optionalTemplate variables validated against variables_schema.transportobject · requiredVoice media transport: webrtc (browser SDP offer) or call (joining a Palbase Calls room).curl
curl -X POST "https://<your-ref>.palbase.studio/ai/client/templates/<name>/voice" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"transport":{"type":"webrtc"}}'Responses
201Started template voice session
400HTTP 400 error
401HTTP 401 error
402HTTP 402 error
403HTTP 403 error
404HTTP 404 error
429HTTP 429 error
503HTTP 503 error
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation VoiceClientTemplate of ai's contract.