curl --request POST \
--url https://api.callhq.ai/api/assistants \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Test Assistant",
"voice": {
"provider": "sarvam",
"voiceId": "anushka",
"model": "bulbul:v2",
"language": "en",
"speed": 1
},
"transcriber": {
"provider": "Deepgram",
"model": "nova-3",
"language": "en"
},
"model": {
"provider": "openai",
"model": "gpt-4o",
"temperature": 0.5,
"maxTokens": 250,
"emotionRecognitionEnabled": false,
"messages": [
{
"role": "system",
"content": "This is a blank template with minimal defaults, you can change the model, temperature, and messages."
}
],
"knowledgeBase": {
"fileIds": [
"<string>"
]
}
},
"firstMessage": "Hello.",
"firstMessageMode": "assistant-speaks-first",
"backgroundSound": "office",
"silenceTimeoutSeconds": 10,
"backgroundDenoisingEnabled": true,
"firstMessageInterruptionsEnabled": false,
"maxDurationSeconds": 3600,
"analysisPlan": {},
"knowledgeBase": {
"fileIds": [
"<string>"
]
},
"hangupUsingPrompt": {
"enabled": false,
"prompt": "Thank you for calling. Goodbye!"
}
}
'import requests
url = "https://api.callhq.ai/api/assistants"
payload = {
"name": "Test Assistant",
"voice": {
"provider": "sarvam",
"voiceId": "anushka",
"model": "bulbul:v2",
"language": "en",
"speed": 1
},
"transcriber": {
"provider": "Deepgram",
"model": "nova-3",
"language": "en"
},
"model": {
"provider": "openai",
"model": "gpt-4o",
"temperature": 0.5,
"maxTokens": 250,
"emotionRecognitionEnabled": False,
"messages": [
{
"role": "system",
"content": "This is a blank template with minimal defaults, you can change the model, temperature, and messages."
}
],
"knowledgeBase": { "fileIds": ["<string>"] }
},
"firstMessage": "Hello.",
"firstMessageMode": "assistant-speaks-first",
"backgroundSound": "office",
"silenceTimeoutSeconds": 10,
"backgroundDenoisingEnabled": True,
"firstMessageInterruptionsEnabled": False,
"maxDurationSeconds": 3600,
"analysisPlan": {},
"knowledgeBase": { "fileIds": ["<string>"] },
"hangupUsingPrompt": {
"enabled": False,
"prompt": "Thank you for calling. Goodbye!"
}
}
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: 'Test Assistant',
voice: {
provider: 'sarvam',
voiceId: 'anushka',
model: 'bulbul:v2',
language: 'en',
speed: 1
},
transcriber: {provider: 'Deepgram', model: 'nova-3', language: 'en'},
model: {
provider: 'openai',
model: 'gpt-4o',
temperature: 0.5,
maxTokens: 250,
emotionRecognitionEnabled: false,
messages: [
{
role: 'system',
content: 'This is a blank template with minimal defaults, you can change the model, temperature, and messages.'
}
],
knowledgeBase: {fileIds: ['<string>']}
},
firstMessage: 'Hello.',
firstMessageMode: 'assistant-speaks-first',
backgroundSound: 'office',
silenceTimeoutSeconds: 10,
backgroundDenoisingEnabled: true,
firstMessageInterruptionsEnabled: false,
maxDurationSeconds: 3600,
analysisPlan: {},
knowledgeBase: {fileIds: ['<string>']},
hangupUsingPrompt: {enabled: false, prompt: 'Thank you for calling. Goodbye!'}
})
};
fetch('https://api.callhq.ai/api/assistants', 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.callhq.ai/api/assistants",
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' => 'Test Assistant',
'voice' => [
'provider' => 'sarvam',
'voiceId' => 'anushka',
'model' => 'bulbul:v2',
'language' => 'en',
'speed' => 1
],
'transcriber' => [
'provider' => 'Deepgram',
'model' => 'nova-3',
'language' => 'en'
],
'model' => [
'provider' => 'openai',
'model' => 'gpt-4o',
'temperature' => 0.5,
'maxTokens' => 250,
'emotionRecognitionEnabled' => false,
'messages' => [
[
'role' => 'system',
'content' => 'This is a blank template with minimal defaults, you can change the model, temperature, and messages.'
]
],
'knowledgeBase' => [
'fileIds' => [
'<string>'
]
]
],
'firstMessage' => 'Hello.',
'firstMessageMode' => 'assistant-speaks-first',
'backgroundSound' => 'office',
'silenceTimeoutSeconds' => 10,
'backgroundDenoisingEnabled' => true,
'firstMessageInterruptionsEnabled' => false,
'maxDurationSeconds' => 3600,
'analysisPlan' => [
],
'knowledgeBase' => [
'fileIds' => [
'<string>'
]
],
'hangupUsingPrompt' => [
'enabled' => false,
'prompt' => 'Thank you for calling. Goodbye!'
]
]),
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.callhq.ai/api/assistants"
payload := strings.NewReader("{\n \"name\": \"Test Assistant\",\n \"voice\": {\n \"provider\": \"sarvam\",\n \"voiceId\": \"anushka\",\n \"model\": \"bulbul:v2\",\n \"language\": \"en\",\n \"speed\": 1\n },\n \"transcriber\": {\n \"provider\": \"Deepgram\",\n \"model\": \"nova-3\",\n \"language\": \"en\"\n },\n \"model\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"temperature\": 0.5,\n \"maxTokens\": 250,\n \"emotionRecognitionEnabled\": false,\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"This is a blank template with minimal defaults, you can change the model, temperature, and messages.\"\n }\n ],\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n }\n },\n \"firstMessage\": \"Hello.\",\n \"firstMessageMode\": \"assistant-speaks-first\",\n \"backgroundSound\": \"office\",\n \"silenceTimeoutSeconds\": 10,\n \"backgroundDenoisingEnabled\": true,\n \"firstMessageInterruptionsEnabled\": false,\n \"maxDurationSeconds\": 3600,\n \"analysisPlan\": {},\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n },\n \"hangupUsingPrompt\": {\n \"enabled\": false,\n \"prompt\": \"Thank you for calling. Goodbye!\"\n }\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.callhq.ai/api/assistants")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Test Assistant\",\n \"voice\": {\n \"provider\": \"sarvam\",\n \"voiceId\": \"anushka\",\n \"model\": \"bulbul:v2\",\n \"language\": \"en\",\n \"speed\": 1\n },\n \"transcriber\": {\n \"provider\": \"Deepgram\",\n \"model\": \"nova-3\",\n \"language\": \"en\"\n },\n \"model\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"temperature\": 0.5,\n \"maxTokens\": 250,\n \"emotionRecognitionEnabled\": false,\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"This is a blank template with minimal defaults, you can change the model, temperature, and messages.\"\n }\n ],\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n }\n },\n \"firstMessage\": \"Hello.\",\n \"firstMessageMode\": \"assistant-speaks-first\",\n \"backgroundSound\": \"office\",\n \"silenceTimeoutSeconds\": 10,\n \"backgroundDenoisingEnabled\": true,\n \"firstMessageInterruptionsEnabled\": false,\n \"maxDurationSeconds\": 3600,\n \"analysisPlan\": {},\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n },\n \"hangupUsingPrompt\": {\n \"enabled\": false,\n \"prompt\": \"Thank you for calling. Goodbye!\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.callhq.ai/api/assistants")
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\": \"Test Assistant\",\n \"voice\": {\n \"provider\": \"sarvam\",\n \"voiceId\": \"anushka\",\n \"model\": \"bulbul:v2\",\n \"language\": \"en\",\n \"speed\": 1\n },\n \"transcriber\": {\n \"provider\": \"Deepgram\",\n \"model\": \"nova-3\",\n \"language\": \"en\"\n },\n \"model\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"temperature\": 0.5,\n \"maxTokens\": 250,\n \"emotionRecognitionEnabled\": false,\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"This is a blank template with minimal defaults, you can change the model, temperature, and messages.\"\n }\n ],\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n }\n },\n \"firstMessage\": \"Hello.\",\n \"firstMessageMode\": \"assistant-speaks-first\",\n \"backgroundSound\": \"office\",\n \"silenceTimeoutSeconds\": 10,\n \"backgroundDenoisingEnabled\": true,\n \"firstMessageInterruptionsEnabled\": false,\n \"maxDurationSeconds\": 3600,\n \"analysisPlan\": {},\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n },\n \"hangupUsingPrompt\": {\n \"enabled\": false,\n \"prompt\": \"Thank you for calling. Goodbye!\"\n }\n}"
response = http.request(request)
puts response.read_bodyCreate Assistant
curl --request POST \
--url https://api.callhq.ai/api/assistants \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Test Assistant",
"voice": {
"provider": "sarvam",
"voiceId": "anushka",
"model": "bulbul:v2",
"language": "en",
"speed": 1
},
"transcriber": {
"provider": "Deepgram",
"model": "nova-3",
"language": "en"
},
"model": {
"provider": "openai",
"model": "gpt-4o",
"temperature": 0.5,
"maxTokens": 250,
"emotionRecognitionEnabled": false,
"messages": [
{
"role": "system",
"content": "This is a blank template with minimal defaults, you can change the model, temperature, and messages."
}
],
"knowledgeBase": {
"fileIds": [
"<string>"
]
}
},
"firstMessage": "Hello.",
"firstMessageMode": "assistant-speaks-first",
"backgroundSound": "office",
"silenceTimeoutSeconds": 10,
"backgroundDenoisingEnabled": true,
"firstMessageInterruptionsEnabled": false,
"maxDurationSeconds": 3600,
"analysisPlan": {},
"knowledgeBase": {
"fileIds": [
"<string>"
]
},
"hangupUsingPrompt": {
"enabled": false,
"prompt": "Thank you for calling. Goodbye!"
}
}
'import requests
url = "https://api.callhq.ai/api/assistants"
payload = {
"name": "Test Assistant",
"voice": {
"provider": "sarvam",
"voiceId": "anushka",
"model": "bulbul:v2",
"language": "en",
"speed": 1
},
"transcriber": {
"provider": "Deepgram",
"model": "nova-3",
"language": "en"
},
"model": {
"provider": "openai",
"model": "gpt-4o",
"temperature": 0.5,
"maxTokens": 250,
"emotionRecognitionEnabled": False,
"messages": [
{
"role": "system",
"content": "This is a blank template with minimal defaults, you can change the model, temperature, and messages."
}
],
"knowledgeBase": { "fileIds": ["<string>"] }
},
"firstMessage": "Hello.",
"firstMessageMode": "assistant-speaks-first",
"backgroundSound": "office",
"silenceTimeoutSeconds": 10,
"backgroundDenoisingEnabled": True,
"firstMessageInterruptionsEnabled": False,
"maxDurationSeconds": 3600,
"analysisPlan": {},
"knowledgeBase": { "fileIds": ["<string>"] },
"hangupUsingPrompt": {
"enabled": False,
"prompt": "Thank you for calling. Goodbye!"
}
}
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: 'Test Assistant',
voice: {
provider: 'sarvam',
voiceId: 'anushka',
model: 'bulbul:v2',
language: 'en',
speed: 1
},
transcriber: {provider: 'Deepgram', model: 'nova-3', language: 'en'},
model: {
provider: 'openai',
model: 'gpt-4o',
temperature: 0.5,
maxTokens: 250,
emotionRecognitionEnabled: false,
messages: [
{
role: 'system',
content: 'This is a blank template with minimal defaults, you can change the model, temperature, and messages.'
}
],
knowledgeBase: {fileIds: ['<string>']}
},
firstMessage: 'Hello.',
firstMessageMode: 'assistant-speaks-first',
backgroundSound: 'office',
silenceTimeoutSeconds: 10,
backgroundDenoisingEnabled: true,
firstMessageInterruptionsEnabled: false,
maxDurationSeconds: 3600,
analysisPlan: {},
knowledgeBase: {fileIds: ['<string>']},
hangupUsingPrompt: {enabled: false, prompt: 'Thank you for calling. Goodbye!'}
})
};
fetch('https://api.callhq.ai/api/assistants', 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.callhq.ai/api/assistants",
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' => 'Test Assistant',
'voice' => [
'provider' => 'sarvam',
'voiceId' => 'anushka',
'model' => 'bulbul:v2',
'language' => 'en',
'speed' => 1
],
'transcriber' => [
'provider' => 'Deepgram',
'model' => 'nova-3',
'language' => 'en'
],
'model' => [
'provider' => 'openai',
'model' => 'gpt-4o',
'temperature' => 0.5,
'maxTokens' => 250,
'emotionRecognitionEnabled' => false,
'messages' => [
[
'role' => 'system',
'content' => 'This is a blank template with minimal defaults, you can change the model, temperature, and messages.'
]
],
'knowledgeBase' => [
'fileIds' => [
'<string>'
]
]
],
'firstMessage' => 'Hello.',
'firstMessageMode' => 'assistant-speaks-first',
'backgroundSound' => 'office',
'silenceTimeoutSeconds' => 10,
'backgroundDenoisingEnabled' => true,
'firstMessageInterruptionsEnabled' => false,
'maxDurationSeconds' => 3600,
'analysisPlan' => [
],
'knowledgeBase' => [
'fileIds' => [
'<string>'
]
],
'hangupUsingPrompt' => [
'enabled' => false,
'prompt' => 'Thank you for calling. Goodbye!'
]
]),
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.callhq.ai/api/assistants"
payload := strings.NewReader("{\n \"name\": \"Test Assistant\",\n \"voice\": {\n \"provider\": \"sarvam\",\n \"voiceId\": \"anushka\",\n \"model\": \"bulbul:v2\",\n \"language\": \"en\",\n \"speed\": 1\n },\n \"transcriber\": {\n \"provider\": \"Deepgram\",\n \"model\": \"nova-3\",\n \"language\": \"en\"\n },\n \"model\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"temperature\": 0.5,\n \"maxTokens\": 250,\n \"emotionRecognitionEnabled\": false,\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"This is a blank template with minimal defaults, you can change the model, temperature, and messages.\"\n }\n ],\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n }\n },\n \"firstMessage\": \"Hello.\",\n \"firstMessageMode\": \"assistant-speaks-first\",\n \"backgroundSound\": \"office\",\n \"silenceTimeoutSeconds\": 10,\n \"backgroundDenoisingEnabled\": true,\n \"firstMessageInterruptionsEnabled\": false,\n \"maxDurationSeconds\": 3600,\n \"analysisPlan\": {},\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n },\n \"hangupUsingPrompt\": {\n \"enabled\": false,\n \"prompt\": \"Thank you for calling. Goodbye!\"\n }\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.callhq.ai/api/assistants")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Test Assistant\",\n \"voice\": {\n \"provider\": \"sarvam\",\n \"voiceId\": \"anushka\",\n \"model\": \"bulbul:v2\",\n \"language\": \"en\",\n \"speed\": 1\n },\n \"transcriber\": {\n \"provider\": \"Deepgram\",\n \"model\": \"nova-3\",\n \"language\": \"en\"\n },\n \"model\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"temperature\": 0.5,\n \"maxTokens\": 250,\n \"emotionRecognitionEnabled\": false,\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"This is a blank template with minimal defaults, you can change the model, temperature, and messages.\"\n }\n ],\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n }\n },\n \"firstMessage\": \"Hello.\",\n \"firstMessageMode\": \"assistant-speaks-first\",\n \"backgroundSound\": \"office\",\n \"silenceTimeoutSeconds\": 10,\n \"backgroundDenoisingEnabled\": true,\n \"firstMessageInterruptionsEnabled\": false,\n \"maxDurationSeconds\": 3600,\n \"analysisPlan\": {},\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n },\n \"hangupUsingPrompt\": {\n \"enabled\": false,\n \"prompt\": \"Thank you for calling. Goodbye!\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.callhq.ai/api/assistants")
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\": \"Test Assistant\",\n \"voice\": {\n \"provider\": \"sarvam\",\n \"voiceId\": \"anushka\",\n \"model\": \"bulbul:v2\",\n \"language\": \"en\",\n \"speed\": 1\n },\n \"transcriber\": {\n \"provider\": \"Deepgram\",\n \"model\": \"nova-3\",\n \"language\": \"en\"\n },\n \"model\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4o\",\n \"temperature\": 0.5,\n \"maxTokens\": 250,\n \"emotionRecognitionEnabled\": false,\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"This is a blank template with minimal defaults, you can change the model, temperature, and messages.\"\n }\n ],\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n }\n },\n \"firstMessage\": \"Hello.\",\n \"firstMessageMode\": \"assistant-speaks-first\",\n \"backgroundSound\": \"office\",\n \"silenceTimeoutSeconds\": 10,\n \"backgroundDenoisingEnabled\": true,\n \"firstMessageInterruptionsEnabled\": false,\n \"maxDurationSeconds\": 3600,\n \"analysisPlan\": {},\n \"knowledgeBase\": {\n \"fileIds\": [\n \"<string>\"\n ]\n },\n \"hangupUsingPrompt\": {\n \"enabled\": false,\n \"prompt\": \"Thank you for calling. Goodbye!\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Body
"Test Assistant"
Voice configuration. Supports ElevenLabs or Sarvam. For Sarvam, voiceId, model, and language are required.
Show child attributes
Show child attributes
Speech-to-text configuration.
Show child attributes
Show child attributes
LLM configuration. Supported providers and models: openai (gpt-4.1-mini, gpt-4.1, gpt-4.1-nano, gpt-4o-mini, gpt-4o, gpt-3.5-turbo), azure (gpt-4.1-mini-cluster, gpt-4.1-cluster, gpt-4.1-nano-cluster, gpt-4o-mini-cluster, gpt-4o-cluster, gpt-4-cluster, gpt-3.5-cluster), openrouter (gpt-oss-20b, gpt-oss-120b, gpt-4, gpt-4o-mini, gpt-4o, gpt-4.1, gpt-4.1-nano, gpt-4.1-mini, claude-sonnet-4), deepseek (deepseek-chat), anthropic (sonnet-4).
Show child attributes
Show child attributes
"Hello."
"assistant-speaks-first"
"office"
10
true
false
3600
Analysis plan configuration for call insights and follow-up actions.
Knowledge base at root level. Files are validated against organization ownership.
Show child attributes
Show child attributes
Configuration for ending the call using a custom prompt.
Show child attributes
Show child attributes
Response
Assistant created successfully