Create Call Agent
curl --request POST \
--url https://api.trillet.ai/v1/api/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"name": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": true,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [
{}
],
"llmModel": "<string>",
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
'import requests
url = "https://api.trillet.ai/v1/api/agents"
payload = {
"name": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": True,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [{}],
"llmModel": "<string>",
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
ttsModel: {
provider: '<string>',
voiceId: '<string>',
language: '<string>',
elevenLabsApiKey: '<string>'
},
smartCallback: true,
maxAttemptsForSmartCallback: 123,
gapBetweenEachAttemptForSmartCallback: [{days: 123, hours: 123}],
phoneNumberIds: [{}],
llmModel: '<string>',
settings: {speed: 123, volume: 123, temperature: 123},
variables: {}
})
};
fetch('https://api.trillet.ai/v1/api/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v1/api/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'ttsModel' => [
'provider' => '<string>',
'voiceId' => '<string>',
'language' => '<string>',
'elevenLabsApiKey' => '<string>'
],
'smartCallback' => true,
'maxAttemptsForSmartCallback' => 123,
'gapBetweenEachAttemptForSmartCallback' => [
[
'days' => 123,
'hours' => 123
]
],
'phoneNumberIds' => [
[
]
],
'llmModel' => '<string>',
'settings' => [
'speed' => 123,
'volume' => 123,
'temperature' => 123
],
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v1/api/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"llmModel\": \"<string>\",\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.trillet.ai/v1/api/agents")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"llmModel\": \"<string>\",\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"llmModel\": \"<string>\",\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "Customer Support Agent",
"ttsModel": {
"provider": "rime",
"voiceId": "mistv2_Wildflower",
"name": "Sophie",
"language": "en"
},
"llmModel": "gpt-4o",
"type": "voice",
"smartCallback": true,
"maxAttemptsForSmartCallback": 3,
"gapBetweenEachAttemptForSmartCallback": [
{ "days": 1, "hours": 2 },
{ "days": 2, "hours": 0 },
{ "days": 3, "hours": 6 }
],
"settings": {
"speed": 0.8,
"volume": 1,
"temperature": 0.7
}
}
Call Agents
Create Call Agent
Create a new agent for a workspace.
POST
/
v1
/
api
/
agents
Create Call Agent
curl --request POST \
--url https://api.trillet.ai/v1/api/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"name": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": true,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [
{}
],
"llmModel": "<string>",
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
'import requests
url = "https://api.trillet.ai/v1/api/agents"
payload = {
"name": "<string>",
"ttsModel": {
"provider": "<string>",
"voiceId": "<string>",
"language": "<string>",
"elevenLabsApiKey": "<string>"
},
"smartCallback": True,
"maxAttemptsForSmartCallback": 123,
"gapBetweenEachAttemptForSmartCallback": [
{
"days": 123,
"hours": 123
}
],
"phoneNumberIds": [{}],
"llmModel": "<string>",
"settings": {
"speed": 123,
"volume": 123,
"temperature": 123
},
"variables": {}
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
ttsModel: {
provider: '<string>',
voiceId: '<string>',
language: '<string>',
elevenLabsApiKey: '<string>'
},
smartCallback: true,
maxAttemptsForSmartCallback: 123,
gapBetweenEachAttemptForSmartCallback: [{days: 123, hours: 123}],
phoneNumberIds: [{}],
llmModel: '<string>',
settings: {speed: 123, volume: 123, temperature: 123},
variables: {}
})
};
fetch('https://api.trillet.ai/v1/api/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trillet.ai/v1/api/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'ttsModel' => [
'provider' => '<string>',
'voiceId' => '<string>',
'language' => '<string>',
'elevenLabsApiKey' => '<string>'
],
'smartCallback' => true,
'maxAttemptsForSmartCallback' => 123,
'gapBetweenEachAttemptForSmartCallback' => [
[
'days' => 123,
'hours' => 123
]
],
'phoneNumberIds' => [
[
]
],
'llmModel' => '<string>',
'settings' => [
'speed' => 123,
'volume' => 123,
'temperature' => 123
],
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trillet.ai/v1/api/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"llmModel\": \"<string>\",\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.trillet.ai/v1/api/agents")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"llmModel\": \"<string>\",\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"ttsModel\": {\n \"provider\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"language\": \"<string>\",\n \"elevenLabsApiKey\": \"<string>\"\n },\n \"smartCallback\": true,\n \"maxAttemptsForSmartCallback\": 123,\n \"gapBetweenEachAttemptForSmartCallback\": [\n {\n \"days\": 123,\n \"hours\": 123\n }\n ],\n \"phoneNumberIds\": [\n {}\n ],\n \"llmModel\": \"<string>\",\n \"settings\": {\n \"speed\": 123,\n \"volume\": 123,\n \"temperature\": 123\n },\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "Customer Support Agent",
"ttsModel": {
"provider": "rime",
"voiceId": "mistv2_Wildflower",
"name": "Sophie",
"language": "en"
},
"llmModel": "gpt-4o",
"type": "voice",
"smartCallback": true,
"maxAttemptsForSmartCallback": 3,
"gapBetweenEachAttemptForSmartCallback": [
{ "days": 1, "hours": 2 },
{ "days": 2, "hours": 0 },
{ "days": 3, "hours": 6 }
],
"settings": {
"speed": 0.8,
"volume": 1,
"temperature": 0.7
}
}
Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Request Body
string
required
Name of the agent being created.
object
required
Text-to-Speech (TTS) configuration for the agent.
Show properties
Show properties
string
required
TTS provider. Must be one of the following: openai, rime, elevenlabs, 11labs_byo, google.
string
required
The voice ID used for generating speech. e.g for Trillet Voices,
“mistv2_Wildflower” - Alt Female, Smart
“mistv2_Brook” - Male, Friendly
“mistv2_Violet” - Female, Professional
string
default:"en"
required
Language code (e.g., en, fr).
string
ElevenLabs API key (required only when provider is “11labs_byo”). This will be encrypted and stored securely.
boolean
default:"false"
Enable smart callback functionality for the agent.
number
default:"5"
Maximum number of callback attempts when smart callback is enabled.
array
array
Array of phone number IDs to associate with the agent.
string
default:"gpt-4o-mini"
required
Language Model to be used by the agent to generate responses. Must be one of: gpt-4o-mini, gpt-4o, gpt-4o-enterprise, gpt-4.1, gpt-4.1-mini, gpt-4.1-enterprise, gpt-4.1-mini-enterprise, gemini-2.5-flash, gemini-2.0-flash-001.
object
object
Custom variables to store for the agent.
Response Fields
string
Unique identifier for the newly created agent.
string
Workspace ID associated with the agent.
string
User ID of the agent creator.
string
Name of the agent.
object
Text-to-Speech configuration for the agent.
string
TTS provider used by the agent.
string
default:"mistv2_Wildflower"
Voice ID used for generating speech. (e.g., mistv2_Brook, mistv2_Violet, mistv2_Wildflower)
string
Language code of the TTS voice.
string
Encrypted ElevenLabs API key (only present if provider is “11labs_byo”).
string
Language Model used by the agent to generate responses.
boolean
Whether smart callback is enabled for the agent.
number
Maximum number of callback attempts.
array
Array of time intervals between callback attempts.
array
Array of phone number IDs associated with the agent.
array
Array of active sessions for the agent.
object
Additional settings configured for the agent.
string
Current status of the agent (pending, ready, or error).
string
Current node or state within the agent’s flow.
object
Custom variables stored for the agent.
string
Timestamp when the agent was created.
string
Timestamp when the agent was last updated.
{
"name": "Customer Support Agent",
"ttsModel": {
"provider": "rime",
"voiceId": "mistv2_Wildflower",
"name": "Sophie",
"language": "en"
},
"llmModel": "gpt-4o",
"type": "voice",
"smartCallback": true,
"maxAttemptsForSmartCallback": 3,
"gapBetweenEachAttemptForSmartCallback": [
{ "days": 1, "hours": 2 },
{ "days": 2, "hours": 0 },
{ "days": 3, "hours": 6 }
],
"settings": {
"speed": 0.8,
"volume": 1,
"temperature": 0.7
}
}
⌘I
