curl --request POST \
--url https://api.openmic.ai/v1/bots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Customer Support Bot",
"prompt": "You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.",
"first_message": "Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?",
"knowledge_base_id": 123,
"voice_provider": "OpenAI",
"voice": "alloy",
"voice_model": "tts-1",
"voice_speed": 1,
"llm_model_name": "gpt-4",
"llm_model_temperature": 0.7,
"stt_provider": "Deepgram",
"stt_model": "nova-2",
"call_settings": {
"max_call_duration": 10,
"silence_timeout": 15,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "I didn't hear anything. Are you still there?",
"call_recording_enabled": true,
"voicemail_detection_enabled": true,
"voicemail_action": "leave_message",
"voicemail_message_type": "static",
"voicemail_message": "Hey, sorry we couldn't reach you directly. Please give us a callback if you can.",
"hipaa_compliance_enabled": false,
"pci_compliance_enabled": false
},
"advanced_settings": {
"agent_personality": "friendly",
"humanize_conversation": true,
"background_noise_reduction": true,
"allow_interruptions": true,
"min_interruption_duration": 0.5,
"agent_response_length": "normal",
"short_pause": 0.3,
"long_pause": 1
},
"post_call_settings": {
"summary_prompt": "Provide a brief summary of the customer interaction and any action items.",
"success_evaluation_prompt": "Rate the success of this call on a scale of 1-10 based on customer satisfaction.",
"success_evaluation_rubric_type": "NUMERIC_SCALE"
}
}
EOFimport requests
url = "https://api.openmic.ai/v1/bots"
payload = {
"name": "Customer Support Bot",
"prompt": "You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.",
"first_message": "Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?",
"knowledge_base_id": 123,
"voice_provider": "OpenAI",
"voice": "alloy",
"voice_model": "tts-1",
"voice_speed": 1,
"llm_model_name": "gpt-4",
"llm_model_temperature": 0.7,
"stt_provider": "Deepgram",
"stt_model": "nova-2",
"call_settings": {
"max_call_duration": 10,
"silence_timeout": 15,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "I didn't hear anything. Are you still there?",
"call_recording_enabled": True,
"voicemail_detection_enabled": True,
"voicemail_action": "leave_message",
"voicemail_message_type": "static",
"voicemail_message": "Hey, sorry we couldn't reach you directly. Please give us a callback if you can.",
"hipaa_compliance_enabled": False,
"pci_compliance_enabled": False
},
"advanced_settings": {
"agent_personality": "friendly",
"humanize_conversation": True,
"background_noise_reduction": True,
"allow_interruptions": True,
"min_interruption_duration": 0.5,
"agent_response_length": "normal",
"short_pause": 0.3,
"long_pause": 1
},
"post_call_settings": {
"summary_prompt": "Provide a brief summary of the customer interaction and any action items.",
"success_evaluation_prompt": "Rate the success of this call on a scale of 1-10 based on customer satisfaction.",
"success_evaluation_rubric_type": "NUMERIC_SCALE"
}
}
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: 'Customer Support Bot',
prompt: 'You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.',
first_message: 'Hello! I\'m here to help you with any questions or concerns you may have. How can I assist you today?',
knowledge_base_id: 123,
voice_provider: 'OpenAI',
voice: 'alloy',
voice_model: 'tts-1',
voice_speed: 1,
llm_model_name: 'gpt-4',
llm_model_temperature: 0.7,
stt_provider: 'Deepgram',
stt_model: 'nova-2',
call_settings: {
max_call_duration: 10,
silence_timeout: 15,
silence_timeout_max_retries: 3,
silence_timeout_message: 'I didn\'t hear anything. Are you still there?',
call_recording_enabled: true,
voicemail_detection_enabled: true,
voicemail_action: 'leave_message',
voicemail_message_type: 'static',
voicemail_message: 'Hey, sorry we couldn\'t reach you directly. Please give us a callback if you can.',
hipaa_compliance_enabled: false,
pci_compliance_enabled: false
},
advanced_settings: {
agent_personality: 'friendly',
humanize_conversation: true,
background_noise_reduction: true,
allow_interruptions: true,
min_interruption_duration: 0.5,
agent_response_length: 'normal',
short_pause: 0.3,
long_pause: 1
},
post_call_settings: {
summary_prompt: 'Provide a brief summary of the customer interaction and any action items.',
success_evaluation_prompt: 'Rate the success of this call on a scale of 1-10 based on customer satisfaction.',
success_evaluation_rubric_type: 'NUMERIC_SCALE'
}
})
};
fetch('https://api.openmic.ai/v1/bots', 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.openmic.ai/v1/bots",
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',
'prompt' => 'You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.',
'first_message' => 'Hello! I\'m here to help you with any questions or concerns you may have. How can I assist you today?',
'knowledge_base_id' => 123,
'voice_provider' => 'OpenAI',
'voice' => 'alloy',
'voice_model' => 'tts-1',
'voice_speed' => 1,
'llm_model_name' => 'gpt-4',
'llm_model_temperature' => 0.7,
'stt_provider' => 'Deepgram',
'stt_model' => 'nova-2',
'call_settings' => [
'max_call_duration' => 10,
'silence_timeout' => 15,
'silence_timeout_max_retries' => 3,
'silence_timeout_message' => 'I didn\'t hear anything. Are you still there?',
'call_recording_enabled' => true,
'voicemail_detection_enabled' => true,
'voicemail_action' => 'leave_message',
'voicemail_message_type' => 'static',
'voicemail_message' => 'Hey, sorry we couldn\'t reach you directly. Please give us a callback if you can.',
'hipaa_compliance_enabled' => false,
'pci_compliance_enabled' => false
],
'advanced_settings' => [
'agent_personality' => 'friendly',
'humanize_conversation' => true,
'background_noise_reduction' => true,
'allow_interruptions' => true,
'min_interruption_duration' => 0.5,
'agent_response_length' => 'normal',
'short_pause' => 0.3,
'long_pause' => 1
],
'post_call_settings' => [
'summary_prompt' => 'Provide a brief summary of the customer interaction and any action items.',
'success_evaluation_prompt' => 'Rate the success of this call on a scale of 1-10 based on customer satisfaction.',
'success_evaluation_rubric_type' => 'NUMERIC_SCALE'
]
]),
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://api.openmic.ai/v1/bots"
payload := strings.NewReader("{\n \"name\": \"Customer Support Bot\",\n \"prompt\": \"You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.\",\n \"first_message\": \"Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?\",\n \"knowledge_base_id\": 123,\n \"voice_provider\": \"OpenAI\",\n \"voice\": \"alloy\",\n \"voice_model\": \"tts-1\",\n \"voice_speed\": 1,\n \"llm_model_name\": \"gpt-4\",\n \"llm_model_temperature\": 0.7,\n \"stt_provider\": \"Deepgram\",\n \"stt_model\": \"nova-2\",\n \"call_settings\": {\n \"max_call_duration\": 10,\n \"silence_timeout\": 15,\n \"silence_timeout_max_retries\": 3,\n \"silence_timeout_message\": \"I didn't hear anything. Are you still there?\",\n \"call_recording_enabled\": true,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"static\",\n \"voicemail_message\": \"Hey, sorry we couldn't reach you directly. Please give us a callback if you can.\",\n \"hipaa_compliance_enabled\": false,\n \"pci_compliance_enabled\": false\n },\n \"advanced_settings\": {\n \"agent_personality\": \"friendly\",\n \"humanize_conversation\": true,\n \"background_noise_reduction\": true,\n \"allow_interruptions\": true,\n \"min_interruption_duration\": 0.5,\n \"agent_response_length\": \"normal\",\n \"short_pause\": 0.3,\n \"long_pause\": 1\n },\n \"post_call_settings\": {\n \"summary_prompt\": \"Provide a brief summary of the customer interaction and any action items.\",\n \"success_evaluation_prompt\": \"Rate the success of this call on a scale of 1-10 based on customer satisfaction.\",\n \"success_evaluation_rubric_type\": \"NUMERIC_SCALE\"\n }\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://api.openmic.ai/v1/bots")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Bot\",\n \"prompt\": \"You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.\",\n \"first_message\": \"Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?\",\n \"knowledge_base_id\": 123,\n \"voice_provider\": \"OpenAI\",\n \"voice\": \"alloy\",\n \"voice_model\": \"tts-1\",\n \"voice_speed\": 1,\n \"llm_model_name\": \"gpt-4\",\n \"llm_model_temperature\": 0.7,\n \"stt_provider\": \"Deepgram\",\n \"stt_model\": \"nova-2\",\n \"call_settings\": {\n \"max_call_duration\": 10,\n \"silence_timeout\": 15,\n \"silence_timeout_max_retries\": 3,\n \"silence_timeout_message\": \"I didn't hear anything. Are you still there?\",\n \"call_recording_enabled\": true,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"static\",\n \"voicemail_message\": \"Hey, sorry we couldn't reach you directly. Please give us a callback if you can.\",\n \"hipaa_compliance_enabled\": false,\n \"pci_compliance_enabled\": false\n },\n \"advanced_settings\": {\n \"agent_personality\": \"friendly\",\n \"humanize_conversation\": true,\n \"background_noise_reduction\": true,\n \"allow_interruptions\": true,\n \"min_interruption_duration\": 0.5,\n \"agent_response_length\": \"normal\",\n \"short_pause\": 0.3,\n \"long_pause\": 1\n },\n \"post_call_settings\": {\n \"summary_prompt\": \"Provide a brief summary of the customer interaction and any action items.\",\n \"success_evaluation_prompt\": \"Rate the success of this call on a scale of 1-10 based on customer satisfaction.\",\n \"success_evaluation_rubric_type\": \"NUMERIC_SCALE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmic.ai/v1/bots")
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\": \"Customer Support Bot\",\n \"prompt\": \"You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.\",\n \"first_message\": \"Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?\",\n \"knowledge_base_id\": 123,\n \"voice_provider\": \"OpenAI\",\n \"voice\": \"alloy\",\n \"voice_model\": \"tts-1\",\n \"voice_speed\": 1,\n \"llm_model_name\": \"gpt-4\",\n \"llm_model_temperature\": 0.7,\n \"stt_provider\": \"Deepgram\",\n \"stt_model\": \"nova-2\",\n \"call_settings\": {\n \"max_call_duration\": 10,\n \"silence_timeout\": 15,\n \"silence_timeout_max_retries\": 3,\n \"silence_timeout_message\": \"I didn't hear anything. Are you still there?\",\n \"call_recording_enabled\": true,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"static\",\n \"voicemail_message\": \"Hey, sorry we couldn't reach you directly. Please give us a callback if you can.\",\n \"hipaa_compliance_enabled\": false,\n \"pci_compliance_enabled\": false\n },\n \"advanced_settings\": {\n \"agent_personality\": \"friendly\",\n \"humanize_conversation\": true,\n \"background_noise_reduction\": true,\n \"allow_interruptions\": true,\n \"min_interruption_duration\": 0.5,\n \"agent_response_length\": \"normal\",\n \"short_pause\": 0.3,\n \"long_pause\": 1\n },\n \"post_call_settings\": {\n \"summary_prompt\": \"Provide a brief summary of the customer interaction and any action items.\",\n \"success_evaluation_prompt\": \"Rate the success of this call on a scale of 1-10 based on customer satisfaction.\",\n \"success_evaluation_rubric_type\": \"NUMERIC_SCALE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_message": "<string>",
"knowledge_base_id": 123,
"voice": "<string>",
"voice_model": "<string>",
"voice_speed": 123,
"llm_model_name": "<string>",
"llm_model_temperature": 123,
"stt_provider": "Deepgram",
"stt_model": "<string>",
"call_settings": {
"max_call_duration": 16,
"silence_timeout": 25,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "<string>",
"call_recording_enabled": true,
"voicemail_detection_enabled": true,
"voicemail_message": "<string>",
"hipaa_compliance_enabled": true,
"pci_compliance_enabled": true
},
"advanced_settings": {
"humanize_conversation": true,
"background_noise_reduction": true,
"allow_interruptions": true,
"min_interruption_duration": 2.6,
"background_sound": "<string>",
"short_pause": 1.1,
"long_pause": 3.25,
"filter_phrases": "<string>"
},
"post_call_settings": {
"summary_prompt": "<string>",
"success_evaluation_prompt": "<string>",
"structured_extraction_prompt": "<string>",
"structured_extraction_json_schema": {}
}
}{
"error": "Invalid request format, please check API reference."
}{
"error": "Unauthorized",
"message": "Invalid or expired API key"
}{
"error": "An unexpected error occurred. Please try again later."
}Create Bot
Create a new bot with specified configuration.
curl --request POST \
--url https://api.openmic.ai/v1/bots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Customer Support Bot",
"prompt": "You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.",
"first_message": "Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?",
"knowledge_base_id": 123,
"voice_provider": "OpenAI",
"voice": "alloy",
"voice_model": "tts-1",
"voice_speed": 1,
"llm_model_name": "gpt-4",
"llm_model_temperature": 0.7,
"stt_provider": "Deepgram",
"stt_model": "nova-2",
"call_settings": {
"max_call_duration": 10,
"silence_timeout": 15,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "I didn't hear anything. Are you still there?",
"call_recording_enabled": true,
"voicemail_detection_enabled": true,
"voicemail_action": "leave_message",
"voicemail_message_type": "static",
"voicemail_message": "Hey, sorry we couldn't reach you directly. Please give us a callback if you can.",
"hipaa_compliance_enabled": false,
"pci_compliance_enabled": false
},
"advanced_settings": {
"agent_personality": "friendly",
"humanize_conversation": true,
"background_noise_reduction": true,
"allow_interruptions": true,
"min_interruption_duration": 0.5,
"agent_response_length": "normal",
"short_pause": 0.3,
"long_pause": 1
},
"post_call_settings": {
"summary_prompt": "Provide a brief summary of the customer interaction and any action items.",
"success_evaluation_prompt": "Rate the success of this call on a scale of 1-10 based on customer satisfaction.",
"success_evaluation_rubric_type": "NUMERIC_SCALE"
}
}
EOFimport requests
url = "https://api.openmic.ai/v1/bots"
payload = {
"name": "Customer Support Bot",
"prompt": "You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.",
"first_message": "Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?",
"knowledge_base_id": 123,
"voice_provider": "OpenAI",
"voice": "alloy",
"voice_model": "tts-1",
"voice_speed": 1,
"llm_model_name": "gpt-4",
"llm_model_temperature": 0.7,
"stt_provider": "Deepgram",
"stt_model": "nova-2",
"call_settings": {
"max_call_duration": 10,
"silence_timeout": 15,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "I didn't hear anything. Are you still there?",
"call_recording_enabled": True,
"voicemail_detection_enabled": True,
"voicemail_action": "leave_message",
"voicemail_message_type": "static",
"voicemail_message": "Hey, sorry we couldn't reach you directly. Please give us a callback if you can.",
"hipaa_compliance_enabled": False,
"pci_compliance_enabled": False
},
"advanced_settings": {
"agent_personality": "friendly",
"humanize_conversation": True,
"background_noise_reduction": True,
"allow_interruptions": True,
"min_interruption_duration": 0.5,
"agent_response_length": "normal",
"short_pause": 0.3,
"long_pause": 1
},
"post_call_settings": {
"summary_prompt": "Provide a brief summary of the customer interaction and any action items.",
"success_evaluation_prompt": "Rate the success of this call on a scale of 1-10 based on customer satisfaction.",
"success_evaluation_rubric_type": "NUMERIC_SCALE"
}
}
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: 'Customer Support Bot',
prompt: 'You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.',
first_message: 'Hello! I\'m here to help you with any questions or concerns you may have. How can I assist you today?',
knowledge_base_id: 123,
voice_provider: 'OpenAI',
voice: 'alloy',
voice_model: 'tts-1',
voice_speed: 1,
llm_model_name: 'gpt-4',
llm_model_temperature: 0.7,
stt_provider: 'Deepgram',
stt_model: 'nova-2',
call_settings: {
max_call_duration: 10,
silence_timeout: 15,
silence_timeout_max_retries: 3,
silence_timeout_message: 'I didn\'t hear anything. Are you still there?',
call_recording_enabled: true,
voicemail_detection_enabled: true,
voicemail_action: 'leave_message',
voicemail_message_type: 'static',
voicemail_message: 'Hey, sorry we couldn\'t reach you directly. Please give us a callback if you can.',
hipaa_compliance_enabled: false,
pci_compliance_enabled: false
},
advanced_settings: {
agent_personality: 'friendly',
humanize_conversation: true,
background_noise_reduction: true,
allow_interruptions: true,
min_interruption_duration: 0.5,
agent_response_length: 'normal',
short_pause: 0.3,
long_pause: 1
},
post_call_settings: {
summary_prompt: 'Provide a brief summary of the customer interaction and any action items.',
success_evaluation_prompt: 'Rate the success of this call on a scale of 1-10 based on customer satisfaction.',
success_evaluation_rubric_type: 'NUMERIC_SCALE'
}
})
};
fetch('https://api.openmic.ai/v1/bots', 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.openmic.ai/v1/bots",
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',
'prompt' => 'You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.',
'first_message' => 'Hello! I\'m here to help you with any questions or concerns you may have. How can I assist you today?',
'knowledge_base_id' => 123,
'voice_provider' => 'OpenAI',
'voice' => 'alloy',
'voice_model' => 'tts-1',
'voice_speed' => 1,
'llm_model_name' => 'gpt-4',
'llm_model_temperature' => 0.7,
'stt_provider' => 'Deepgram',
'stt_model' => 'nova-2',
'call_settings' => [
'max_call_duration' => 10,
'silence_timeout' => 15,
'silence_timeout_max_retries' => 3,
'silence_timeout_message' => 'I didn\'t hear anything. Are you still there?',
'call_recording_enabled' => true,
'voicemail_detection_enabled' => true,
'voicemail_action' => 'leave_message',
'voicemail_message_type' => 'static',
'voicemail_message' => 'Hey, sorry we couldn\'t reach you directly. Please give us a callback if you can.',
'hipaa_compliance_enabled' => false,
'pci_compliance_enabled' => false
],
'advanced_settings' => [
'agent_personality' => 'friendly',
'humanize_conversation' => true,
'background_noise_reduction' => true,
'allow_interruptions' => true,
'min_interruption_duration' => 0.5,
'agent_response_length' => 'normal',
'short_pause' => 0.3,
'long_pause' => 1
],
'post_call_settings' => [
'summary_prompt' => 'Provide a brief summary of the customer interaction and any action items.',
'success_evaluation_prompt' => 'Rate the success of this call on a scale of 1-10 based on customer satisfaction.',
'success_evaluation_rubric_type' => 'NUMERIC_SCALE'
]
]),
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://api.openmic.ai/v1/bots"
payload := strings.NewReader("{\n \"name\": \"Customer Support Bot\",\n \"prompt\": \"You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.\",\n \"first_message\": \"Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?\",\n \"knowledge_base_id\": 123,\n \"voice_provider\": \"OpenAI\",\n \"voice\": \"alloy\",\n \"voice_model\": \"tts-1\",\n \"voice_speed\": 1,\n \"llm_model_name\": \"gpt-4\",\n \"llm_model_temperature\": 0.7,\n \"stt_provider\": \"Deepgram\",\n \"stt_model\": \"nova-2\",\n \"call_settings\": {\n \"max_call_duration\": 10,\n \"silence_timeout\": 15,\n \"silence_timeout_max_retries\": 3,\n \"silence_timeout_message\": \"I didn't hear anything. Are you still there?\",\n \"call_recording_enabled\": true,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"static\",\n \"voicemail_message\": \"Hey, sorry we couldn't reach you directly. Please give us a callback if you can.\",\n \"hipaa_compliance_enabled\": false,\n \"pci_compliance_enabled\": false\n },\n \"advanced_settings\": {\n \"agent_personality\": \"friendly\",\n \"humanize_conversation\": true,\n \"background_noise_reduction\": true,\n \"allow_interruptions\": true,\n \"min_interruption_duration\": 0.5,\n \"agent_response_length\": \"normal\",\n \"short_pause\": 0.3,\n \"long_pause\": 1\n },\n \"post_call_settings\": {\n \"summary_prompt\": \"Provide a brief summary of the customer interaction and any action items.\",\n \"success_evaluation_prompt\": \"Rate the success of this call on a scale of 1-10 based on customer satisfaction.\",\n \"success_evaluation_rubric_type\": \"NUMERIC_SCALE\"\n }\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://api.openmic.ai/v1/bots")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Bot\",\n \"prompt\": \"You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.\",\n \"first_message\": \"Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?\",\n \"knowledge_base_id\": 123,\n \"voice_provider\": \"OpenAI\",\n \"voice\": \"alloy\",\n \"voice_model\": \"tts-1\",\n \"voice_speed\": 1,\n \"llm_model_name\": \"gpt-4\",\n \"llm_model_temperature\": 0.7,\n \"stt_provider\": \"Deepgram\",\n \"stt_model\": \"nova-2\",\n \"call_settings\": {\n \"max_call_duration\": 10,\n \"silence_timeout\": 15,\n \"silence_timeout_max_retries\": 3,\n \"silence_timeout_message\": \"I didn't hear anything. Are you still there?\",\n \"call_recording_enabled\": true,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"static\",\n \"voicemail_message\": \"Hey, sorry we couldn't reach you directly. Please give us a callback if you can.\",\n \"hipaa_compliance_enabled\": false,\n \"pci_compliance_enabled\": false\n },\n \"advanced_settings\": {\n \"agent_personality\": \"friendly\",\n \"humanize_conversation\": true,\n \"background_noise_reduction\": true,\n \"allow_interruptions\": true,\n \"min_interruption_duration\": 0.5,\n \"agent_response_length\": \"normal\",\n \"short_pause\": 0.3,\n \"long_pause\": 1\n },\n \"post_call_settings\": {\n \"summary_prompt\": \"Provide a brief summary of the customer interaction and any action items.\",\n \"success_evaluation_prompt\": \"Rate the success of this call on a scale of 1-10 based on customer satisfaction.\",\n \"success_evaluation_rubric_type\": \"NUMERIC_SCALE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openmic.ai/v1/bots")
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\": \"Customer Support Bot\",\n \"prompt\": \"You are a helpful customer support assistant. Be polite, professional, and always try to resolve customer issues.\",\n \"first_message\": \"Hello! I'm here to help you with any questions or concerns you may have. How can I assist you today?\",\n \"knowledge_base_id\": 123,\n \"voice_provider\": \"OpenAI\",\n \"voice\": \"alloy\",\n \"voice_model\": \"tts-1\",\n \"voice_speed\": 1,\n \"llm_model_name\": \"gpt-4\",\n \"llm_model_temperature\": 0.7,\n \"stt_provider\": \"Deepgram\",\n \"stt_model\": \"nova-2\",\n \"call_settings\": {\n \"max_call_duration\": 10,\n \"silence_timeout\": 15,\n \"silence_timeout_max_retries\": 3,\n \"silence_timeout_message\": \"I didn't hear anything. Are you still there?\",\n \"call_recording_enabled\": true,\n \"voicemail_detection_enabled\": true,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message_type\": \"static\",\n \"voicemail_message\": \"Hey, sorry we couldn't reach you directly. Please give us a callback if you can.\",\n \"hipaa_compliance_enabled\": false,\n \"pci_compliance_enabled\": false\n },\n \"advanced_settings\": {\n \"agent_personality\": \"friendly\",\n \"humanize_conversation\": true,\n \"background_noise_reduction\": true,\n \"allow_interruptions\": true,\n \"min_interruption_duration\": 0.5,\n \"agent_response_length\": \"normal\",\n \"short_pause\": 0.3,\n \"long_pause\": 1\n },\n \"post_call_settings\": {\n \"summary_prompt\": \"Provide a brief summary of the customer interaction and any action items.\",\n \"success_evaluation_prompt\": \"Rate the success of this call on a scale of 1-10 based on customer satisfaction.\",\n \"success_evaluation_rubric_type\": \"NUMERIC_SCALE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_message": "<string>",
"knowledge_base_id": 123,
"voice": "<string>",
"voice_model": "<string>",
"voice_speed": 123,
"llm_model_name": "<string>",
"llm_model_temperature": 123,
"stt_provider": "Deepgram",
"stt_model": "<string>",
"call_settings": {
"max_call_duration": 16,
"silence_timeout": 25,
"silence_timeout_max_retries": 3,
"silence_timeout_message": "<string>",
"call_recording_enabled": true,
"voicemail_detection_enabled": true,
"voicemail_message": "<string>",
"hipaa_compliance_enabled": true,
"pci_compliance_enabled": true
},
"advanced_settings": {
"humanize_conversation": true,
"background_noise_reduction": true,
"allow_interruptions": true,
"min_interruption_duration": 2.6,
"background_sound": "<string>",
"short_pause": 1.1,
"long_pause": 3.25,
"filter_phrases": "<string>"
},
"post_call_settings": {
"summary_prompt": "<string>",
"success_evaluation_prompt": "<string>",
"structured_extraction_prompt": "<string>",
"structured_extraction_json_schema": {}
}
}{
"error": "Invalid request format, please check API reference."
}{
"error": "Unauthorized",
"message": "Invalid or expired API key"
}{
"error": "An unexpected error occurred. Please try again later."
}Authorizations
API key authentication. Include your API key in the Authorization header as: Authorization: Bearer <your-api-key>
Body
Bot configuration details
Name of the bot (max 255 characters)
255System prompt for the bot
Initial message the bot will send
ID of the knowledge base to use
Voice synthesis provider
OpenAI, ElevenLabs, Deepgram Voice ID or name
Voice model to use
Speech speed multiplier
Large language model to use
Temperature setting for the LLM
Speech-to-text provider
Deepgram Speech-to-text model
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Bot created successfully
Unique identifier of the bot
Name of the bot
System prompt for the bot
Bot creation timestamp
Bot last update timestamp
Initial message the bot will send
ID of the knowledge base
Voice synthesis provider
OpenAI, ElevenLabs, Deepgram Voice ID or name
Voice model being used
Speech speed multiplier
Large language model being used
Temperature setting for the LLM
Speech-to-text provider
Deepgram Speech-to-text model
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?