API Reference V1
Calls
Telephony
Conversations
Folder Management
Call Flows
Message Flows
Call Agents
Connect a Web Call
Initiate a live web-based call session with an AI agent.
POST
/
v1
/
api
/
calls
/
web
/
connect
Copy
Ask AI
curl --request POST \
--url https://api.trillet.ai/v1/api/calls/web/connect \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '{
"agentId": "<string>",
"mode": "<string>"
}'
Copy
Ask AI
{
"status": "success",
"callId": "call1234",
"roomName": "web-genericAgent-call1234",
"token": "<REDACTED_JWT_TOKEN>",
"agent": {
"id": "agent12345678",
"name": "Generic Agent",
"model": "llm-mini",
"voice": {
"provider": "genericVoiceProvider",
"voiceId": "standard",
"language": "en"
}
}
}
Initiate a web call that runs entirely via WebRTC in the browser (no phone number required). The agent can interact via voice.
Headers
API key used for authenticating requests to the API.
Workspace identifier for the API.
Request Body
The ID of the agent that will handle this web call.
The mode of the call. Defaults to “voice”.
Copy
Ask AI
{
"status": "success",
"callId": "call1234",
"roomName": "web-genericAgent-call1234",
"token": "<REDACTED_JWT_TOKEN>",
"agent": {
"id": "agent12345678",
"name": "Generic Agent",
"model": "llm-mini",
"voice": {
"provider": "genericVoiceProvider",
"voiceId": "standard",
"language": "en"
}
}
}
Copy
Ask AI
curl --request POST \
--url https://api.trillet.ai/v1/api/calls/web/connect \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '{
"agentId": "<string>",
"mode": "<string>"
}'
Copy
Ask AI
{
"status": "success",
"callId": "call1234",
"roomName": "web-genericAgent-call1234",
"token": "<REDACTED_JWT_TOKEN>",
"agent": {
"id": "agent12345678",
"name": "Generic Agent",
"model": "llm-mini",
"voice": {
"provider": "genericVoiceProvider",
"voiceId": "standard",
"language": "en"
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.