Create an assistant
Create a new AI assistant with a custom prompt, voice, and behavior configuration. Assistants define how the AI agent behaves during calls, including the system prompt given to the LLM, the first sentence spoken, the voice provider and voice ID (Cartesia or ElevenLabs), and end-of-call behavior. Once created, reference the assistant by its ID when placing calls.
Parameters
The prompt to use for the call. This will be given to the LLM (gpt-4.1)
The background sound to play during the call. Useful to give the impression that your AI agent is in an office, in the street, or anywhere else you want.
Optional message to say when the agent decides to end the call.
The first sentence to use for the call. This will be given to the LLM
Delay in milliseconds before speaking the first sentence. Default: 400.
The maximum duration of the call in seconds. This is the maximum time the call will be allowed to run.
Phone number to transfer calls to when users request to speak to a human agent in E.164 format (e.g. +1234567890).
If set, when voicemail is detected the agent will speak this message then hang up; if null, hang up immediately.
The webhook URL to call when the call is completed.
Returns
Create an assistant
require "revox"
revox = Revox::Client.new(api_key: "My API Key")
assistant = revox.assistants.create(name: "name", prompt: "prompt")
puts(assistant){
"assistant": {
"id": "id",
"background_sound": "audio/office.ogg",
"calendly": {
"connection_id": "connection_id",
"event_type_id": "event_type_id"
},
"call_retry_config": {
"calling_windows": [
{
"calling_window_end_time": "calling_window_end_time",
"calling_window_start_time": "calling_window_start_time",
"retry_delay_seconds": 1
}
],
"max_retry_attempts": 1,
"timezone": "timezone"
},
"created_at": {},
"end_of_call_sentence": "end_of_call_sentence",
"first_sentence": "first_sentence",
"first_sentence_delay_ms": -9007199254740991,
"first_sentence_mode": "generated",
"ivr_navigation_enabled": true,
"llm_model": {
"name": "gpt-4.1",
"type": "dedicated-instance"
},
"max_call_duration_secs": 0,
"name": "name",
"organization_id": "organization_id",
"prompt": "prompt",
"structured_output_config": [
{
"name": "x",
"required": true,
"type": "string",
"description": "description",
"enum_options": [
"string"
]
}
],
"transfer_phone_number": "transfer_phone_number",
"updated_at": {},
"voice": {
"id": "x",
"provider": "cartesia",
"speed": 0.6
},
"voicemail_message": "voicemail_message",
"webhook_url": "webhook_url",
"faq_items": [
{
"answer": "answer",
"question": "question",
"id": "id",
"needs_human_answer": true,
"source": "human"
}
],
"pending_faq_count": 0
}
}Returns Examples
{
"assistant": {
"id": "id",
"background_sound": "audio/office.ogg",
"calendly": {
"connection_id": "connection_id",
"event_type_id": "event_type_id"
},
"call_retry_config": {
"calling_windows": [
{
"calling_window_end_time": "calling_window_end_time",
"calling_window_start_time": "calling_window_start_time",
"retry_delay_seconds": 1
}
],
"max_retry_attempts": 1,
"timezone": "timezone"
},
"created_at": {},
"end_of_call_sentence": "end_of_call_sentence",
"first_sentence": "first_sentence",
"first_sentence_delay_ms": -9007199254740991,
"first_sentence_mode": "generated",
"ivr_navigation_enabled": true,
"llm_model": {
"name": "gpt-4.1",
"type": "dedicated-instance"
},
"max_call_duration_secs": 0,
"name": "name",
"organization_id": "organization_id",
"prompt": "prompt",
"structured_output_config": [
{
"name": "x",
"required": true,
"type": "string",
"description": "description",
"enum_options": [
"string"
]
}
],
"transfer_phone_number": "transfer_phone_number",
"updated_at": {},
"voice": {
"id": "x",
"provider": "cartesia",
"speed": 0.6
},
"voicemail_message": "voicemail_message",
"webhook_url": "webhook_url",
"faq_items": [
{
"answer": "answer",
"question": "question",
"id": "id",
"needs_human_answer": true,
"source": "human"
}
],
"pending_faq_count": 0
}
}