Create Agent
curl --request POST \
--url https://api.talkifai.dev/v1/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Customer Support Bot",
"description": "Handles tier-1 support queries",
"sysMsg": "You are a helpful customer support agent.",
"agentArchitecture": "pipeline",
"model": "gpt_4o_mini",
"stt": "deepgram",
"voiceId": "gemini-leda-en",
"greetingType": "agentFirst",
"greetingMessage": "Hello! How can I help you today?",
"temperature": 0.7,
"inactivityTimeout": 30,
"mode": "public",
"languages": [
"english"
],
"functionCallingEnabled": false,
"enabledFunctions": [],
"enabledCustomFunctions": []
}
'import requests
url = "https://api.talkifai.dev/v1/agents"
payload = {
"name": "Customer Support Bot",
"description": "Handles tier-1 support queries",
"sysMsg": "You are a helpful customer support agent.",
"agentArchitecture": "pipeline",
"model": "gpt_4o_mini",
"stt": "deepgram",
"voiceId": "gemini-leda-en",
"greetingType": "agentFirst",
"greetingMessage": "Hello! How can I help you today?",
"temperature": 0.7,
"inactivityTimeout": 30,
"mode": "public",
"languages": ["english"],
"functionCallingEnabled": False,
"enabledFunctions": [],
"enabledCustomFunctions": []
}
headers = {
"x-api-key": "<api-key>",
"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>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Customer Support Bot',
description: 'Handles tier-1 support queries',
sysMsg: 'You are a helpful customer support agent.',
agentArchitecture: 'pipeline',
model: 'gpt_4o_mini',
stt: 'deepgram',
voiceId: 'gemini-leda-en',
greetingType: 'agentFirst',
greetingMessage: 'Hello! How can I help you today?',
temperature: 0.7,
inactivityTimeout: 30,
mode: 'public',
languages: ['english'],
functionCallingEnabled: false,
enabledFunctions: [],
enabledCustomFunctions: []
})
};
fetch('https://api.talkifai.dev/v1/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.talkifai.dev/v1/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' => 'Customer Support Bot',
'description' => 'Handles tier-1 support queries',
'sysMsg' => 'You are a helpful customer support agent.',
'agentArchitecture' => 'pipeline',
'model' => 'gpt_4o_mini',
'stt' => 'deepgram',
'voiceId' => 'gemini-leda-en',
'greetingType' => 'agentFirst',
'greetingMessage' => 'Hello! How can I help you today?',
'temperature' => 0.7,
'inactivityTimeout' => 30,
'mode' => 'public',
'languages' => [
'english'
],
'functionCallingEnabled' => false,
'enabledFunctions' => [
],
'enabledCustomFunctions' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.talkifai.dev/v1/agents"
payload := strings.NewReader("{\n \"name\": \"Customer Support Bot\",\n \"description\": \"Handles tier-1 support queries\",\n \"sysMsg\": \"You are a helpful customer support agent.\",\n \"agentArchitecture\": \"pipeline\",\n \"model\": \"gpt_4o_mini\",\n \"stt\": \"deepgram\",\n \"voiceId\": \"gemini-leda-en\",\n \"greetingType\": \"agentFirst\",\n \"greetingMessage\": \"Hello! How can I help you today?\",\n \"temperature\": 0.7,\n \"inactivityTimeout\": 30,\n \"mode\": \"public\",\n \"languages\": [\n \"english\"\n ],\n \"functionCallingEnabled\": false,\n \"enabledFunctions\": [],\n \"enabledCustomFunctions\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.talkifai.dev/v1/agents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Bot\",\n \"description\": \"Handles tier-1 support queries\",\n \"sysMsg\": \"You are a helpful customer support agent.\",\n \"agentArchitecture\": \"pipeline\",\n \"model\": \"gpt_4o_mini\",\n \"stt\": \"deepgram\",\n \"voiceId\": \"gemini-leda-en\",\n \"greetingType\": \"agentFirst\",\n \"greetingMessage\": \"Hello! How can I help you today?\",\n \"temperature\": 0.7,\n \"inactivityTimeout\": 30,\n \"mode\": \"public\",\n \"languages\": [\n \"english\"\n ],\n \"functionCallingEnabled\": false,\n \"enabledFunctions\": [],\n \"enabledCustomFunctions\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talkifai.dev/v1/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["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Bot\",\n \"description\": \"Handles tier-1 support queries\",\n \"sysMsg\": \"You are a helpful customer support agent.\",\n \"agentArchitecture\": \"pipeline\",\n \"model\": \"gpt_4o_mini\",\n \"stt\": \"deepgram\",\n \"voiceId\": \"gemini-leda-en\",\n \"greetingType\": \"agentFirst\",\n \"greetingMessage\": \"Hello! How can I help you today?\",\n \"temperature\": 0.7,\n \"inactivityTimeout\": 30,\n \"mode\": \"public\",\n \"languages\": [\n \"english\"\n ],\n \"functionCallingEnabled\": false,\n \"enabledFunctions\": [],\n \"enabledCustomFunctions\": []\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"agent": {
"id": "5b710eca-ee67-4c3a-aeb6-8b541f451b40",
"name": "Customer Support Bot",
"description": "Handles tier-1 support queries",
"agentArchitecture": "pipeline",
"model": "gpt_4o_mini",
"stt": "deepgram",
"voiceId": "gemini-leda-en",
"realtimeProvider": "openai",
"sysMsg": "You are a helpful customer support agent for Acme Corp. Be concise and friendly.",
"greetingType": "agentFirst",
"greetingMessage": "Hello! How can I help you today?",
"temperature": 0.7,
"inactivityTimeout": 30,
"lastMessage": "Is there anything else I can help you with?",
"mode": "public",
"functionCallingEnabled": false,
"enabledFunctions": [
"<string>"
],
"enabledCustomFunctions": [
"<string>"
],
"languages": [
{
"id": "<string>",
"language": "en"
}
],
"userId": "<string>",
"organizationId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}Agents
Create Agent
Creates a new agent. Choose from Pipeline (voice + text), Realtime (lowest latency), or Text (chat only) architecture.
POST
/
v1
/
agents
Create Agent
curl --request POST \
--url https://api.talkifai.dev/v1/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Customer Support Bot",
"description": "Handles tier-1 support queries",
"sysMsg": "You are a helpful customer support agent.",
"agentArchitecture": "pipeline",
"model": "gpt_4o_mini",
"stt": "deepgram",
"voiceId": "gemini-leda-en",
"greetingType": "agentFirst",
"greetingMessage": "Hello! How can I help you today?",
"temperature": 0.7,
"inactivityTimeout": 30,
"mode": "public",
"languages": [
"english"
],
"functionCallingEnabled": false,
"enabledFunctions": [],
"enabledCustomFunctions": []
}
'import requests
url = "https://api.talkifai.dev/v1/agents"
payload = {
"name": "Customer Support Bot",
"description": "Handles tier-1 support queries",
"sysMsg": "You are a helpful customer support agent.",
"agentArchitecture": "pipeline",
"model": "gpt_4o_mini",
"stt": "deepgram",
"voiceId": "gemini-leda-en",
"greetingType": "agentFirst",
"greetingMessage": "Hello! How can I help you today?",
"temperature": 0.7,
"inactivityTimeout": 30,
"mode": "public",
"languages": ["english"],
"functionCallingEnabled": False,
"enabledFunctions": [],
"enabledCustomFunctions": []
}
headers = {
"x-api-key": "<api-key>",
"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>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Customer Support Bot',
description: 'Handles tier-1 support queries',
sysMsg: 'You are a helpful customer support agent.',
agentArchitecture: 'pipeline',
model: 'gpt_4o_mini',
stt: 'deepgram',
voiceId: 'gemini-leda-en',
greetingType: 'agentFirst',
greetingMessage: 'Hello! How can I help you today?',
temperature: 0.7,
inactivityTimeout: 30,
mode: 'public',
languages: ['english'],
functionCallingEnabled: false,
enabledFunctions: [],
enabledCustomFunctions: []
})
};
fetch('https://api.talkifai.dev/v1/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.talkifai.dev/v1/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' => 'Customer Support Bot',
'description' => 'Handles tier-1 support queries',
'sysMsg' => 'You are a helpful customer support agent.',
'agentArchitecture' => 'pipeline',
'model' => 'gpt_4o_mini',
'stt' => 'deepgram',
'voiceId' => 'gemini-leda-en',
'greetingType' => 'agentFirst',
'greetingMessage' => 'Hello! How can I help you today?',
'temperature' => 0.7,
'inactivityTimeout' => 30,
'mode' => 'public',
'languages' => [
'english'
],
'functionCallingEnabled' => false,
'enabledFunctions' => [
],
'enabledCustomFunctions' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.talkifai.dev/v1/agents"
payload := strings.NewReader("{\n \"name\": \"Customer Support Bot\",\n \"description\": \"Handles tier-1 support queries\",\n \"sysMsg\": \"You are a helpful customer support agent.\",\n \"agentArchitecture\": \"pipeline\",\n \"model\": \"gpt_4o_mini\",\n \"stt\": \"deepgram\",\n \"voiceId\": \"gemini-leda-en\",\n \"greetingType\": \"agentFirst\",\n \"greetingMessage\": \"Hello! How can I help you today?\",\n \"temperature\": 0.7,\n \"inactivityTimeout\": 30,\n \"mode\": \"public\",\n \"languages\": [\n \"english\"\n ],\n \"functionCallingEnabled\": false,\n \"enabledFunctions\": [],\n \"enabledCustomFunctions\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.talkifai.dev/v1/agents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Bot\",\n \"description\": \"Handles tier-1 support queries\",\n \"sysMsg\": \"You are a helpful customer support agent.\",\n \"agentArchitecture\": \"pipeline\",\n \"model\": \"gpt_4o_mini\",\n \"stt\": \"deepgram\",\n \"voiceId\": \"gemini-leda-en\",\n \"greetingType\": \"agentFirst\",\n \"greetingMessage\": \"Hello! How can I help you today?\",\n \"temperature\": 0.7,\n \"inactivityTimeout\": 30,\n \"mode\": \"public\",\n \"languages\": [\n \"english\"\n ],\n \"functionCallingEnabled\": false,\n \"enabledFunctions\": [],\n \"enabledCustomFunctions\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talkifai.dev/v1/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["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Bot\",\n \"description\": \"Handles tier-1 support queries\",\n \"sysMsg\": \"You are a helpful customer support agent.\",\n \"agentArchitecture\": \"pipeline\",\n \"model\": \"gpt_4o_mini\",\n \"stt\": \"deepgram\",\n \"voiceId\": \"gemini-leda-en\",\n \"greetingType\": \"agentFirst\",\n \"greetingMessage\": \"Hello! How can I help you today?\",\n \"temperature\": 0.7,\n \"inactivityTimeout\": 30,\n \"mode\": \"public\",\n \"languages\": [\n \"english\"\n ],\n \"functionCallingEnabled\": false,\n \"enabledFunctions\": [],\n \"enabledCustomFunctions\": []\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"agent": {
"id": "5b710eca-ee67-4c3a-aeb6-8b541f451b40",
"name": "Customer Support Bot",
"description": "Handles tier-1 support queries",
"agentArchitecture": "pipeline",
"model": "gpt_4o_mini",
"stt": "deepgram",
"voiceId": "gemini-leda-en",
"realtimeProvider": "openai",
"sysMsg": "You are a helpful customer support agent for Acme Corp. Be concise and friendly.",
"greetingType": "agentFirst",
"greetingMessage": "Hello! How can I help you today?",
"temperature": 0.7,
"inactivityTimeout": 30,
"lastMessage": "Is there anything else I can help you with?",
"mode": "public",
"functionCallingEnabled": false,
"enabledFunctions": [
"<string>"
],
"enabledCustomFunctions": [
"<string>"
],
"languages": [
{
"id": "<string>",
"language": "en"
}
],
"userId": "<string>",
"organizationId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}Authorizations
Your TalkifAI API key. Generate from Studio → Settings → API Keys. Format: tk_live_...
Body
application/json
Example:
"Customer Support Bot"
Example:
"Handles tier-1 support queries"
Example:
"You are a helpful customer support agent."
Available options:
pipeline, realtime, text Required for pipeline and text
Example:
"gpt_4o_mini"
Required for pipeline
Example:
"deepgram"
Defaults to gemini-leda-en for pipeline if omitted
Example:
"gemini-leda-en"
Required for realtime
Available options:
openai, gemini Available options:
agentFirst, userFirst Example:
"Hello! How can I help you today?"
Required range:
0 <= x <= 2Required range:
10 <= x <= 60Available options:
public, private, commercial Example:
["english"]
⌘I