Skip to main content
PUT
/
api
/
agent
/
update_voice_agent
/
{voice_agent_id}
Update Voice Agent
curl --request PUT \
  --url https://voiceagent.infers.co/api/agent/update_voice_agent/{voice_agent_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_name": "<string>",
  "initial_text": "Welcome to our service. I am an AI voice agent, how can I assist you today?",
  "llm_options": "openai",
  "responsiveness": 0.9,
  "voice_id": "Katy (female)",
  "voice_model": "APEX",
  "voice_agent_expressiveness": 0.28,
  "event_webhook_url": "https://example.com/webhook",
  "end_call_on_goodbye": true,
  "prompt": "You are a virtual assistant speaking with Infer who can answer queries about any topic.",
  "telephony_providers": {
    "twilio_config": {
      "auth_token": "<TOKEN>",
      "account_sid": "<SID>",
      "standard_key_sid": "<string>",
      "number": "+<COUNTRY_CODE><NUMBER>",
      "update_webhook": false,
      "record": true
    },
    "plivo_config": {
      "number": "+<COUNTRY_CODE><NUMBER>",
      "update_webhook": false,
      "auth_token": "<string>",
      "auth_id": "<string>",
      "record": true
    },
    "web_config": {
      "site_domain": "<string>"
    }
  },
  "custom_llm": {
    "url": "<string>",
    "api_key": "<string>",
    "model": "<string>"
  },
  "filler_audio": {
    "noise": "typing-audio",
    "silence_threshold_seconds": 2
  },
  "actions": {
    "transfer_calls": {
      "number_dict": {},
      "user_message": "<string>",
      "transfer_mode": "COLD",
      "summary_prompt": "<string>"
    },
    "hangup_call": true,
    "extract_data_from_call": {
      "fields_or_questions": [
        "<string>"
      ],
      "fields_or_questions_with_description": [
        {
          "question": "<string>",
          "description": "<string>"
        }
      ]
    },
    "external_api_calls": [
      {
        "name": "<string>",
        "description": "<string>",
        "url": "<string>",
        "input_schema": "<string>",
        "signature_secret": "<string>",
        "authorization": "<string>",
        "speak_on_send": true,
        "speak_on_receive": true
      }
    ]
  },
  "language": "EN",
  "re_engage_config": {
    "time": 17.5,
    "message": "<string>"
  },
  "keywords": {
    "keywords_to_include": [
      "systrom",
      "krieger"
    ]
  }
}'
{
  "agent": {
    "agent_name": "<string>",
    "initial_text": "Welcome to our service. I am an AI voice agent, how can I assist you today?",
    "prompt": "You are a virtual assistant speaking with Infer who can answer queries about any topic.",
    "llm_options": "openai",
    "responsiveness": 0.2,
    "voice_id": "Alice (female)",
    "voice_model": "APEX",
    "voice_agent_expressiveness": 0.28,
    "telephony_providers": {
      "twilio_config": {
        "auth_token": "<TOKEN>",
        "account_sid": "<SID>",
        "standard_key_sid": "<string>",
        "number": "+<COUNTRY_CODE><NUMBER>",
        "update_webhook": false,
        "record": true
      },
      "plivo_config": {
        "number": "+<COUNTRY_CODE><NUMBER>",
        "update_webhook": false,
        "auth_token": "<string>",
        "auth_id": "<string>",
        "record": true
      },
      "web_config": {
        "site_domain": "<string>"
      }
    },
    "custom_llm": {
      "url": "<string>",
      "api_key": "<string>",
      "model": "<string>"
    },
    "language": "EN",
    "filler_audio": {
      "noise": "typing-audio",
      "silence_threshold_seconds": 2
    },
    "re_engage_config": {
      "time": 17.5,
      "message": "<string>"
    },
    "actions": {
      "transfer_calls": {
        "number_dict": {},
        "user_message": "<string>",
        "transfer_mode": "COLD",
        "summary_prompt": "<string>"
      },
      "hangup_call": true,
      "extract_data_from_call": {
        "fields_or_questions": [
          "<string>"
        ],
        "fields_or_questions_with_description": [
          {
            "question": "<string>",
            "description": "<string>"
          }
        ]
      },
      "external_api_calls": [
        {
          "name": "<string>",
          "description": "<string>",
          "url": "<string>",
          "input_schema": "<string>",
          "signature_secret": "<string>",
          "authorization": "<string>",
          "speak_on_send": true,
          "speak_on_receive": true
        }
      ]
    },
    "keywords": {
      "keywords_to_include": [
        "systrom",
        "krieger"
      ]
    },
    "voice_agent_id": "<string>",
    "inbound_webhook_url": "<string>",
    "errors": [
      "<string>"
    ]
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Email [email protected] to get your API key

Path Parameters

voice_agent_id
string
required

A unique Id for a voice agent

Body

application/json
agent_name
string
initial_text

If set, this will be the first greeting message that will be said by the voice agent. If unspecified, the voice agent will wait for the human to speak.

Note: Always end the initial text with a question, preferably the first question mentioned in the prompt.

Examples:

"Welcome to our service. I am an AI voice agent, how can I assist you today?"

llm_options
enum<string>
default:openai

Specifies the language model to be used by the voice agent. Options are 'openai' for OpenAI's language model and 'claude' for Anthropic's Claude model. Defaults to 'openai'.

Available options:
openai,
claude
responsiveness
number

Adjusts how quickly the agent will respond when human stops talking, with a value that can vary from 0.1 to 1. A lower value results in a less responsive agent, taking more time to respond. This is helpful in use cases where use takes lot of pauses to think and answer. Conversely, a higher value increases the agent's responsiveness, leading to quicker interactions and responses whenever possible. This is helpful in cases when you're expecting short responses from the human. If unspecified, it defaults to a value of 1, ensuring very quick agent responsiveness.

Required range: 0 <= x <= 1
Examples:

0.9

voice_id

Select the voice for your voice agent and give it a character

Available options:
Jennifer (female),
Katy (female),
Alice (female),
Kayla (female),
Amanda (female),
Liz (female),
Alex (male),
Armand (male),
Dan (male),
Nevin (male),
Kale (male),
Jake (male),
tanya (female),
Dakota H,
John Beamer,
Mark (Young and Calm),
Alisha,
Vijay,
Jordan,
Raju,
Saanu,
Priya,
Sagar,
Monika Sogam,
Vikrant,
Vidhi
Examples:

"Katy (female)"

voice_model
enum<string>
default:APEX

Select the voice model for your voice agent (Nexus for better quality but higher latency and Apex for faster response but lower quality)

Available options:
NEXUS,
APEX
Examples:

"APEX"

voice_agent_expressiveness
number

If set, the voice agent will use this value to determine how expressive its tone is. The lower the number, the more expressive the voice is but can also become highly unstable. Values between 0.24 to 0.40 recommended. If unspecified, it will use

Examples:

0.28

event_webhook_url
string

Webhook URL to receive events related to the voice agent. This is optional and can be set later.

Examples:

"https://example.com/webhook"

end_call_on_goodbye
boolean

If set as True, the voice agent will end the call when the human mentions good bye. If unspecified, it will use the default value of false and wouldn't end the call when human say bye

prompt

If set, the voice agent will use this prompt to guide the conversation with the human. You can also use prompt templating with variables here like: You're a voice assistant called Infer talking to {customer_name}. You can pass in the values to the variables when initiating or receiving the call. If unspecified, it will use the default value

Examples:

"You are a virtual assistant speaking with Infer who can answer queries about any topic."

telephony_providers
object

A object containing your telephony provider information

custom_llm
object

If enabled will use a external URL for LLM calls

filler_audio
object

If enabled will use a external URL for LLM calls

actions
object
language
enum<string>

Language of the bot

Available options:
EN,
HI,
te-IN
re_engage_config
object
keywords
object

Response

Successful Response

agent
object
required