Initialize Agent From Template
curl --request POST \
--url https://dev.voice.ai/api/v1/agent/init-agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://dev.voice.ai/api/v1/agent/init-agent"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://dev.voice.ai/api/v1/agent/init-agent', 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://dev.voice.ai/api/v1/agent/init-agent",
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>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://dev.voice.ai/api/v1/agent/init-agent"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://dev.voice.ai/api/v1/agent/init-agent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.voice.ai/api/v1/agent/init-agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_template": {
"prompt": "<string>",
"greeting": "<string>",
"llm_temperature": 0.7,
"llm_model": "gemini-2.5-flash-lite",
"tts_min_sentence_len": 20,
"tts_params": {
"voice_id": "<string>",
"language": "en",
"temperature": 1,
"top_p": 0.8,
"dictionary_id": "<string>"
},
"min_silence_duration": 0.55,
"min_speech_duration": 0.1,
"user_silence_timeout": 10,
"max_call_duration_seconds": 900,
"allow_interruptions": true,
"allow_interruptions_on_greeting": false,
"min_interruption_words": 1,
"auto_noise_reduction": true,
"allow_agent_to_end_call": false,
"allow_agent_to_skip_turn": false,
"min_endpointing_delay": 0.5,
"max_endpointing_delay": 3,
"vad_activation_threshold": 0.6,
"phone_number": "<string>",
"phone_provider": "twilio",
"recording_enabled": true,
"webhooks": {
"events": [
{
"url": "<string>",
"has_secret": false,
"events": [
"<string>"
],
"timeout": 5,
"enabled": true
}
],
"tools": [
{
"name": "<string>",
"description": "<string>",
"url": "<string>",
"parameters": {},
"response": {},
"timeout": 10
}
],
"inbound_call": {
"url": "<string>",
"has_secret": false,
"timeout": 5,
"enabled": true
}
},
"mcp_servers": [
{
"name": "<string>",
"url": "<string>",
"description": "<string>",
"auth_type": "none",
"auth_token": "<string>",
"headers": {}
}
]
},
"available_types": [
"<string>"
],
"description": "Pre-configured agent template based on selected type"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Agent Management
Initialize Agent From Template
Create an agent from a saved template.
POST
/
api
/
v1
/
agent
/
init-agent
Initialize Agent From Template
curl --request POST \
--url https://dev.voice.ai/api/v1/agent/init-agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://dev.voice.ai/api/v1/agent/init-agent"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://dev.voice.ai/api/v1/agent/init-agent', 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://dev.voice.ai/api/v1/agent/init-agent",
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>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://dev.voice.ai/api/v1/agent/init-agent"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://dev.voice.ai/api/v1/agent/init-agent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.voice.ai/api/v1/agent/init-agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_template": {
"prompt": "<string>",
"greeting": "<string>",
"llm_temperature": 0.7,
"llm_model": "gemini-2.5-flash-lite",
"tts_min_sentence_len": 20,
"tts_params": {
"voice_id": "<string>",
"language": "en",
"temperature": 1,
"top_p": 0.8,
"dictionary_id": "<string>"
},
"min_silence_duration": 0.55,
"min_speech_duration": 0.1,
"user_silence_timeout": 10,
"max_call_duration_seconds": 900,
"allow_interruptions": true,
"allow_interruptions_on_greeting": false,
"min_interruption_words": 1,
"auto_noise_reduction": true,
"allow_agent_to_end_call": false,
"allow_agent_to_skip_turn": false,
"min_endpointing_delay": 0.5,
"max_endpointing_delay": 3,
"vad_activation_threshold": 0.6,
"phone_number": "<string>",
"phone_provider": "twilio",
"recording_enabled": true,
"webhooks": {
"events": [
{
"url": "<string>",
"has_secret": false,
"events": [
"<string>"
],
"timeout": 5,
"enabled": true
}
],
"tools": [
{
"name": "<string>",
"description": "<string>",
"url": "<string>",
"parameters": {},
"response": {},
"timeout": 10
}
],
"inbound_call": {
"url": "<string>",
"has_secret": false,
"timeout": 5,
"enabled": true
}
},
"mcp_servers": [
{
"name": "<string>",
"url": "<string>",
"description": "<string>",
"auth_type": "none",
"auth_token": "<string>",
"headers": {}
}
]
},
"available_types": [
"<string>"
],
"description": "Pre-configured agent template based on selected type"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer token authentication. Use your API key as the bearer token. Format: Authorization: Bearer
Body
application/json
⌘I