@retell-ai/mcp-server 5.11.0 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,15 +27,15 @@ const EMBEDDED_METHODS = [
27
27
  markdown: "## create-phone-call\n\n`client.call.createPhoneCall(from_number: string, to_number: string, agent_override?: { agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: object; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: object | object | object; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }; conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: object; knowledge_base_ids?: string[]; model_choice?: object; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: object; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; }, custom_sip_headers?: object, ignore_e164_validation?: boolean, metadata?: object, override_agent_id?: string, override_agent_version?: number, retell_llm_dynamic_variables?: object): { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: object; call_cost?: object; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: object; llm_token_usage?: object; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: object | object | object | object | object[]; start_timestamp?: number; telephony_identifier?: object; transcript?: string; transcript_object?: object[]; transcript_with_tool_calls?: object | object | object | object | object[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n**post** `/v2/create-phone-call`\n\nCreate a new outbound phone call\n\n### Parameters\n\n- `from_number: string`\n The number you own in E.164 format. Must be a number purchased from Retell or imported to Retell.\n\n- `to_number: string`\n The number you want to call, in E.164 format. If using a number purchased from Retell, only US numbers are supported as destination.\n\n- `agent_override?: { agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }; conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; }`\n For this particular call, override agent configuration with these settings. This allows you to customize agent behavior for individual calls without modifying the base agent.\n - `agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n Override agent configuration settings. Any properties specified here will override the base agent configuration for this call.\n - `conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }`\n Override conversation flow configuration settings. Only applicable when using conversation flow as the response engine. Supported attributes - model_choice, model_temperature, tool_call_strict_mode, knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms.\n - `retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }`\n Override Retell LLM configuration settings. Only applicable when using Retell LLM as the response engine. Supported attributes - model, s2s_model, model_temperature, model_high_priority, tool_call_strict_mode, knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms, begin_message.\n\n- `custom_sip_headers?: object`\n Add optional custom SIP headers to the call.\n\n- `ignore_e164_validation?: boolean`\n If true, the e.164 validation will be ignored for the from_number. This can be useful when you want to dial to internal pseudo numbers. This only applies when you are using custom telephony and does not apply when you are using Retell Telephony. If omitted, the default value is false.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object.\n\n- `override_agent_id?: string`\n For this particular call, override the agent used with this agent id. This does not bind the agent to this number, this is for one time override.\n\n- `override_agent_version?: number`\n For this particular call, override the agent version used with this version. This does not bind the agent version to this number, this is for one time override.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n - `agent_id: string`\n - `agent_version: number`\n - `call_id: string`\n - `call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'`\n - `call_type: 'phone_call'`\n - `direction: 'inbound' | 'outbound'`\n - `from_number: string`\n - `to_number: string`\n - `agent_name?: string`\n - `call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }`\n - `collected_dynamic_variables?: object`\n - `custom_sip_headers?: object`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `disconnection_reason?: string`\n - `duration_ms?: number`\n - `end_timestamp?: number`\n - `knowledge_base_retrieved_contents_url?: string`\n - `latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }`\n - `llm_token_usage?: { average: number; num_requests: number; values: number[]; }`\n - `metadata?: object`\n - `opt_in_signed_url?: boolean`\n - `public_log_url?: string`\n - `recording_multi_channel_url?: string`\n - `recording_url?: string`\n - `retell_llm_dynamic_variables?: object`\n - `scrubbed_recording_multi_channel_url?: string`\n - `scrubbed_recording_url?: string`\n - `scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]`\n - `start_timestamp?: number`\n - `telephony_identifier?: { twilio_call_sid?: string; }`\n - `transcript?: string`\n - `transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; }[]`\n - `transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]`\n - `transfer_destination?: string`\n - `transfer_end_timestamp?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneCallResponse = await client.call.createPhoneCall({ from_number: '+14157774444', to_number: '+12137774445' });\n\nconsole.log(phoneCallResponse);\n```",
28
28
  perLanguage: {
29
29
  http: {
30
- example: 'curl https://api.retellai.com/v2/create-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n --max-time 120 \\\n -d \'{\n "from_number": "+14157774444",\n "to_number": "+12137774445",\n "custom_sip_headers": {\n "X-Custom-Header": "Custom Value"\n },\n "ignore_e164_validation": true,\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "override_agent_version": 1,\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
30
+ example: 'curl https://api.retellai.com/v2/create-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 120 \\\n -d \'{\n "from_number": "+14157774444",\n "to_number": "+12137774445",\n "custom_sip_headers": {\n "X-Custom-Header": "Custom Value"\n },\n "ignore_e164_validation": true,\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "override_agent_version": 1,\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
31
31
  },
32
32
  python: {
33
33
  method: 'call.create_phone_call',
34
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nphone_call_response = client.call.create_phone_call(\n from_number="+14157774444",\n to_number="+12137774445",\n)\nprint(phone_call_response.agent_id)',
34
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_call_response = client.call.create_phone_call(\n from_number="+14157774444",\n to_number="+12137774445",\n)\nprint(phone_call_response.agent_id)',
35
35
  },
36
36
  typescript: {
37
37
  method: 'client.call.createPhoneCall',
38
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst phoneCallResponse = await client.call.createPhoneCall({\n from_number: '+14157774444',\n to_number: '+12137774445',\n});\n\nconsole.log(phoneCallResponse.agent_id);",
38
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneCallResponse = await client.call.createPhoneCall({\n from_number: '+14157774444',\n to_number: '+12137774445',\n});\n\nconsole.log(phoneCallResponse.agent_id);",
39
39
  },
40
40
  },
41
41
  },
@@ -61,15 +61,15 @@ const EMBEDDED_METHODS = [
61
61
  markdown: "## register-phone-call\n\n`client.call.registerPhoneCall(agent_id: string, agent_override?: { agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: object; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: object | object | object; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }; conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: object; knowledge_base_ids?: string[]; model_choice?: object; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: object; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; }, agent_version?: number, direction?: 'inbound' | 'outbound', from_number?: string, metadata?: object, retell_llm_dynamic_variables?: object, to_number?: string): { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: object; call_cost?: object; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: object; llm_token_usage?: object; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: object | object | object | object | object[]; start_timestamp?: number; telephony_identifier?: object; transcript?: string; transcript_object?: object[]; transcript_with_tool_calls?: object | object | object | object | object[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n**post** `/v2/register-phone-call`\n\nRegister a new phone call for custom telephony\n\n### Parameters\n\n- `agent_id: string`\n The agent to use for the call.\n\n- `agent_override?: { agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }; conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; }`\n For this particular call, override agent configuration with these settings. This allows you to customize agent behavior for individual calls without modifying the base agent.\n - `agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n Override agent configuration settings. Any properties specified here will override the base agent configuration for this call.\n - `conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }`\n Override conversation flow configuration settings. Only applicable when using conversation flow as the response engine. Supported attributes - model_choice, model_temperature, tool_call_strict_mode, knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms.\n - `retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }`\n Override Retell LLM configuration settings. Only applicable when using Retell LLM as the response engine. Supported attributes - model, s2s_model, model_temperature, model_high_priority, tool_call_strict_mode, knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms, begin_message.\n\n- `agent_version?: number`\n The version of the agent to use for the call.\n\n- `direction?: 'inbound' | 'outbound'`\n Direction of the phone call. Stored for tracking purpose.\n\n- `from_number?: string`\n The number you own in E.164 format. Stored for tracking purpose.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n- `to_number?: string`\n The number you want to call, in E.164 format. Stored for tracking purpose.\n\n### Returns\n\n- `{ agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n - `agent_id: string`\n - `agent_version: number`\n - `call_id: string`\n - `call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'`\n - `call_type: 'phone_call'`\n - `direction: 'inbound' | 'outbound'`\n - `from_number: string`\n - `to_number: string`\n - `agent_name?: string`\n - `call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }`\n - `collected_dynamic_variables?: object`\n - `custom_sip_headers?: object`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `disconnection_reason?: string`\n - `duration_ms?: number`\n - `end_timestamp?: number`\n - `knowledge_base_retrieved_contents_url?: string`\n - `latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }`\n - `llm_token_usage?: { average: number; num_requests: number; values: number[]; }`\n - `metadata?: object`\n - `opt_in_signed_url?: boolean`\n - `public_log_url?: string`\n - `recording_multi_channel_url?: string`\n - `recording_url?: string`\n - `retell_llm_dynamic_variables?: object`\n - `scrubbed_recording_multi_channel_url?: string`\n - `scrubbed_recording_url?: string`\n - `scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]`\n - `start_timestamp?: number`\n - `telephony_identifier?: { twilio_call_sid?: string; }`\n - `transcript?: string`\n - `transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; }[]`\n - `transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]`\n - `transfer_destination?: string`\n - `transfer_end_timestamp?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneCallResponse = await client.call.registerPhoneCall({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(phoneCallResponse);\n```",
62
62
  perLanguage: {
63
63
  http: {
64
- example: 'curl https://api.retellai.com/v2/register-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "direction": "inbound",\n "from_number": "+14157774444",\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n },\n "to_number": "+12137774445"\n }\'',
64
+ example: 'curl https://api.retellai.com/v2/register-phone-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "direction": "inbound",\n "from_number": "+14157774444",\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n },\n "to_number": "+12137774445"\n }\'',
65
65
  },
66
66
  python: {
67
67
  method: 'call.register_phone_call',
68
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nphone_call_response = client.call.register_phone_call(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(phone_call_response.agent_id)',
68
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_call_response = client.call.register_phone_call(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(phone_call_response.agent_id)',
69
69
  },
70
70
  typescript: {
71
71
  method: 'client.call.registerPhoneCall',
72
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst phoneCallResponse = await client.call.registerPhoneCall({\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(phoneCallResponse.agent_id);",
72
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneCallResponse = await client.call.registerPhoneCall({\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(phoneCallResponse.agent_id);",
73
73
  },
74
74
  },
75
75
  },
@@ -94,15 +94,15 @@ const EMBEDDED_METHODS = [
94
94
  markdown: "## create-web-call\n\n`client.call.createWebCall(agent_id: string, agent_override?: { agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: object; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: object | object | object; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }; conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: object; knowledge_base_ids?: string[]; model_choice?: object; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: object; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; }, agent_version?: number, current_node_id?: string, current_state?: string, metadata?: object, retell_llm_dynamic_variables?: object): { access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: object; call_cost?: object; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: object; llm_token_usage?: object; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: object | object | object | object | object[]; start_timestamp?: number; transcript?: string; transcript_object?: object[]; transcript_with_tool_calls?: object | object | object | object | object[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n**post** `/v2/create-web-call`\n\nCreate a new web call\n\n### Parameters\n\n- `agent_id: string`\n Unique id of agent used for the call. Your agent would contain the LLM Websocket url used for this call.\n\n- `agent_override?: { agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }; conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; }`\n For this particular call, override agent configuration with these settings. This allows you to customize agent behavior for individual calls without modifying the base agent.\n - `agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n Override agent configuration settings. Any properties specified here will override the base agent configuration for this call.\n - `conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }`\n Override conversation flow configuration settings. Only applicable when using conversation flow as the response engine. Supported attributes - model_choice, model_temperature, tool_call_strict_mode, knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms.\n - `retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }`\n Override Retell LLM configuration settings. Only applicable when using Retell LLM as the response engine. Supported attributes - model, s2s_model, model_temperature, model_high_priority, tool_call_strict_mode, knowledge_base_ids, kb_config, start_speaker, begin_after_user_silence_ms, begin_message.\n\n- `agent_version?: number`\n The version of the agent to use for the call.\n\n- `current_node_id?: string`\n Start the call at this conversation flow node (stage). Must be a valid node id in the agent's conversation flow. Only applicable when the agent uses conversation flow as the response engine. Ignored for retell-llm agents.\n\n- `current_state?: string`\n Start the conversation in this state (stage). Must be a valid state name in the agent's Retell LLM. Only applicable when the agent uses Retell LLM with states. Ignored for conversation-flow agents.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; start_timestamp?: number; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n - `access_token: string`\n - `agent_id: string`\n - `agent_version: number`\n - `call_id: string`\n - `call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'`\n - `call_type: 'web_call'`\n - `agent_name?: string`\n - `call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `call_cost?: { combined_cost: number; product_costs: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; total_duration_seconds: number; total_duration_unit_price: number; }`\n - `collected_dynamic_variables?: object`\n - `custom_sip_headers?: object`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `disconnection_reason?: string`\n - `duration_ms?: number`\n - `end_timestamp?: number`\n - `knowledge_base_retrieved_contents_url?: string`\n - `latency?: { asr?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; e2e?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; knowledge_base?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; llm_websocket_network_rtt?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; s2s?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; tts?: { max?: number; min?: number; num?: number; p50?: number; p90?: number; p95?: number; p99?: number; values?: number[]; }; }`\n - `llm_token_usage?: { average: number; num_requests: number; values: number[]; }`\n - `metadata?: object`\n - `opt_in_signed_url?: boolean`\n - `public_log_url?: string`\n - `recording_multi_channel_url?: string`\n - `recording_url?: string`\n - `retell_llm_dynamic_variables?: object`\n - `scrubbed_recording_multi_channel_url?: string`\n - `scrubbed_recording_url?: string`\n - `scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; }[]`\n - `transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: { end?: number; start?: number; word?: string; }[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]`\n - `transfer_destination?: string`\n - `transfer_end_timestamp?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst webCallResponse = await client.call.createWebCall({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(webCallResponse);\n```",
95
95
  perLanguage: {
96
96
  http: {
97
- example: 'curl https://api.retellai.com/v2/create-web-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "current_node_id": "collect_info",\n "current_state": "information_collection",\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
97
+ example: 'curl https://api.retellai.com/v2/create-web-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "current_node_id": "collect_info",\n "current_state": "information_collection",\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
98
98
  },
99
99
  python: {
100
100
  method: 'call.create_web_call',
101
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nweb_call_response = client.call.create_web_call(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(web_call_response.agent_id)',
101
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nweb_call_response = client.call.create_web_call(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(web_call_response.agent_id)',
102
102
  },
103
103
  typescript: {
104
104
  method: 'client.call.createWebCall',
105
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst webCallResponse = await client.call.createWebCall({\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(webCallResponse.agent_id);",
105
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst webCallResponse = await client.call.createWebCall({\n agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(webCallResponse.agent_id);",
106
106
  },
107
107
  },
108
108
  },
@@ -119,15 +119,15 @@ const EMBEDDED_METHODS = [
119
119
  markdown: "## retrieve\n\n`client.call.retrieve(call_id: string): object | object`\n\n**get** `/v2/get-call/{call_id}`\n\nRetrieve details of a specific call\n\n### Parameters\n\n- `call_id: string`\n\n### Returns\n\n- `{ access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; start_timestamp?: number; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d');\n\nconsole.log(callResponse);\n```",
120
120
  perLanguage: {
121
121
  http: {
122
- example: 'curl https://api.retellai.com/v2/get-call/$CALL_ID \\\n -H "Authorization: Bearer $API_KEY"',
122
+ example: 'curl https://api.retellai.com/v2/get-call/$CALL_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
123
123
  },
124
124
  python: {
125
125
  method: 'call.retrieve',
126
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ncall_response = client.call.retrieve(\n "119c3f8e47135a29e65947eeb34cf12d",\n)\nprint(call_response)',
126
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ncall_response = client.call.retrieve(\n "119c3f8e47135a29e65947eeb34cf12d",\n)\nprint(call_response)',
127
127
  },
128
128
  typescript: {
129
129
  method: 'client.call.retrieve',
130
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d');\n\nconsole.log(callResponse);",
130
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d');\n\nconsole.log(callResponse);",
131
131
  },
132
132
  },
133
133
  },
@@ -149,15 +149,15 @@ const EMBEDDED_METHODS = [
149
149
  markdown: "## list\n\n`client.call.list(filter_criteria?: { agent_id?: string[]; batch_call_id?: string[]; call_id?: string[]; call_status?: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; call_successful?: boolean[]; call_type?: 'web_call' | 'phone_call'[]; direction?: 'inbound' | 'outbound'[]; disconnection_reason?: string[]; duration_ms?: { lower_threshold?: number; upper_threshold?: number; }; dynamic_variables?: object; e2e_latency_p50?: { lower_threshold?: number; upper_threshold?: number; }; end_timestamp?: { lower_threshold?: number; upper_threshold?: number; }; from_number?: string[]; in_voicemail?: boolean[]; metadata?: object; start_timestamp?: { lower_threshold?: number; upper_threshold?: number; }; to_number?: string[]; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; version?: number[]; }, limit?: number, pagination_key?: string, sort_order?: 'ascending' | 'descending'): web_call_response | phone_call_response[]`\n\n**post** `/v2/list-calls`\n\nRetrieve call details\n\n### Parameters\n\n- `filter_criteria?: { agent_id?: string[]; batch_call_id?: string[]; call_id?: string[]; call_status?: 'not_connected' | 'ongoing' | 'ended' | 'error'[]; call_successful?: boolean[]; call_type?: 'web_call' | 'phone_call'[]; direction?: 'inbound' | 'outbound'[]; disconnection_reason?: string[]; duration_ms?: { lower_threshold?: number; upper_threshold?: number; }; dynamic_variables?: object; e2e_latency_p50?: { lower_threshold?: number; upper_threshold?: number; }; end_timestamp?: { lower_threshold?: number; upper_threshold?: number; }; from_number?: string[]; in_voicemail?: boolean[]; metadata?: object; start_timestamp?: { lower_threshold?: number; upper_threshold?: number; }; to_number?: string[]; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]; version?: number[]; }`\n Filter criteria for the calls to retrieve.\n - `agent_id?: string[]`\n Only retrieve calls that are made with specific agent(s).\n - `batch_call_id?: string[]`\n Only retrieve calls with specific batch call id(s).\n - `call_id?: string[]`\n Only retrieve calls with specific call id(s).\n - `call_status?: 'not_connected' | 'ongoing' | 'ended' | 'error'[]`\n Only retrieve calls with specific call status(es).\n - `call_successful?: boolean[]`\n Only retrieve calls with specific call successful(s).\n - `call_type?: 'web_call' | 'phone_call'[]`\n Only retrieve calls with specific call type(s).\n - `direction?: 'inbound' | 'outbound'[]`\n Only retrieve calls with specific direction(s).\n - `disconnection_reason?: string[]`\n Only retrieve calls with specific disconnection reason(s).\n - `duration_ms?: { lower_threshold?: number; upper_threshold?: number; }`\n Only retrieve calls with specific range of duration(s).\n - `dynamic_variables?: object`\n Filter by dynamic variables using dot notation (e.g., `dynamic_variables.name`).\nValues are matched exactly as strings.\n\n - `e2e_latency_p50?: { lower_threshold?: number; upper_threshold?: number; }`\n - `end_timestamp?: { lower_threshold?: number; upper_threshold?: number; }`\n Only retrieve calls with specific range of end timestamp(s).\n - `from_number?: string[]`\n Only retrieve calls with specific from number(s).\n - `in_voicemail?: boolean[]`\n Only retrieve calls that are in voicemail or not in voicemail.\n - `metadata?: object`\n Filter by metadata fields using dot notation (e.g., `metadata.customer_id`).\nValues are matched exactly as strings.\n\n - `start_timestamp?: { lower_threshold?: number; upper_threshold?: number; }`\n Only retrieve calls with specific range of start timestamp(s).\n - `to_number?: string[]`\n Only retrieve calls with specific to number(s).\n - `user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'[]`\n Only retrieve calls with specific user sentiment(s).\n - `version?: number[]`\n The version of the agent to use for the call.\n\n- `limit?: number`\n Limit the number of calls returned. Default 50, Max 1000. To retrieve more than 1000, use pagination_key to continue fetching the next page.\n\n- `pagination_key?: string`\n The pagination key to continue fetching the next page of calls. Pagination key is represented by a call id here, and it's exclusive (not included in the fetched calls). The last call id from the list calls is usually used as pagination key here. If not set, will start from the beginning.\n\n- `sort_order?: 'ascending' | 'descending'`\n The calls will be sorted by `start_timestamp`, whether to return the calls in ascending or descending order.\n\n### Returns\n\n- `{ access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: object; call_cost?: object; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: object; llm_token_usage?: object; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: object | object | object | object | object[]; start_timestamp?: number; transcript?: string; transcript_object?: object[]; transcript_with_tool_calls?: object | object | object | object | object[]; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: object; call_cost?: object; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: object; llm_token_usage?: object; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: object | object | object | object | object[]; start_timestamp?: number; telephony_identifier?: object; transcript?: string; transcript_object?: object[]; transcript_with_tool_calls?: object | object | object | object | object[]; transfer_destination?: string; transfer_end_timestamp?: number; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst callResponses = await client.call.list();\n\nconsole.log(callResponses);\n```",
150
150
  perLanguage: {
151
151
  http: {
152
- example: 'curl https://api.retellai.com/v2/list-calls \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n --max-time 300 \\\n -d \'{\n "filter_criteria": {\n "agent_id": [\n "agent_oBeDLoLOeuAbiuaMFXRtDOLriT12345"\n ],\n "call_id": [\n "call_5a82f0a43ea0977566b1104fcfc"\n ],\n "call_status": [\n "ended"\n ],\n "call_successful": [\n true\n ],\n "call_type": [\n "phone_call"\n ],\n "direction": [\n "inbound"\n ],\n "start_timestamp": {\n "lower_threshold": 1738475411000,\n "upper_threshold": 1738475421000\n },\n "user_sentiment": [\n "Positive"\n ]\n }\n }\'',
152
+ example: 'curl https://api.retellai.com/v2/list-calls \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "filter_criteria": {\n "agent_id": [\n "agent_oBeDLoLOeuAbiuaMFXRtDOLriT12345"\n ],\n "call_id": [\n "call_5a82f0a43ea0977566b1104fcfc"\n ],\n "call_status": [\n "ended"\n ],\n "call_successful": [\n true\n ],\n "call_type": [\n "phone_call"\n ],\n "direction": [\n "inbound"\n ],\n "start_timestamp": {\n "lower_threshold": 1738475411000,\n "upper_threshold": 1738475421000\n },\n "user_sentiment": [\n "Positive"\n ]\n }\n }\'',
153
153
  },
154
154
  python: {
155
155
  method: 'call.list',
156
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ncall_responses = client.call.list()\nprint(call_responses)',
156
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ncall_responses = client.call.list()\nprint(call_responses)',
157
157
  },
158
158
  typescript: {
159
159
  method: 'client.call.list',
160
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst callResponses = await client.call.list();\n\nconsole.log(callResponses);",
160
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst callResponses = await client.call.list();\n\nconsole.log(callResponses);",
161
161
  },
162
162
  },
163
163
  },
@@ -180,15 +180,15 @@ const EMBEDDED_METHODS = [
180
180
  markdown: "## update\n\n`client.call.update(call_id: string, custom_attributes?: object, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', metadata?: object, override_dynamic_variables?: object): object | object`\n\n**patch** `/v2/update-call/{call_id}`\n\nUpdate metadata and sensitive data storage settings for an existing call.\n\n### Parameters\n\n- `call_id: string`\n\n- `custom_attributes?: object`\n Custom attributes for the call\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Data storage setting for this call. Overrides the agent's default setting. \"everything\" stores all data, \"everything_except_pii\" excludes PII when possible, \"basic_attributes_only\" stores only metadata. Cannot be downgraded from more restrictive to less restrictive settings.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object. Size limited to 50kB max.\n\n- `override_dynamic_variables?: object`\n Override dynamic varaibles represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing override.\n\n### Returns\n\n- `{ access_token: string; agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'web_call'; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; start_timestamp?: number; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; transfer_destination?: string; transfer_end_timestamp?: number; } | { agent_id: string; agent_version: number; call_id: string; call_status: 'registered' | 'not_connected' | 'ongoing' | 'ended' | 'error'; call_type: 'phone_call'; direction: 'inbound' | 'outbound'; from_number: string; to_number: string; agent_name?: string; call_analysis?: { call_successful?: boolean; call_summary?: string; custom_analysis_data?: object; in_voicemail?: boolean; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; call_cost?: { combined_cost: number; product_costs: object[]; total_duration_seconds: number; total_duration_unit_price: number; }; collected_dynamic_variables?: object; custom_sip_headers?: object; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; disconnection_reason?: string; duration_ms?: number; end_timestamp?: number; knowledge_base_retrieved_contents_url?: string; latency?: { asr?: object; e2e?: object; knowledge_base?: object; llm?: object; llm_websocket_network_rtt?: object; s2s?: object; tts?: object; }; llm_token_usage?: { average: number; num_requests: number; values: number[]; }; metadata?: object; opt_in_signed_url?: boolean; public_log_url?: string; recording_multi_channel_url?: string; recording_url?: string; retell_llm_dynamic_variables?: object; scrubbed_recording_multi_channel_url?: string; scrubbed_recording_url?: string; scrubbed_transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; start_timestamp?: number; telephony_identifier?: { twilio_call_sid?: string; }; transcript?: string; transcript_object?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; }[]; transcript_with_tool_calls?: { content: string; role: 'agent' | 'user' | 'transfer_target'; words: object[]; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; thought_signature?: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { former_node_id: string; former_node_name: string; new_node_id: string; new_node_name: string; role: 'node_transition'; } | { digit: string; role: 'dtmf'; }[]; transfer_destination?: string; transfer_end_timestamp?: number; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst callResponse = await client.call.update('call_a4441234567890777c4a4a123e6');\n\nconsole.log(callResponse);\n```",
181
181
  perLanguage: {
182
182
  http: {
183
- example: 'curl https://api.retellai.com/v2/update-call/$CALL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything_except_pii",\n "metadata": {\n "customer_id": "cust_123",\n "notes": "Follow-up required"\n },\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
183
+ example: 'curl https://api.retellai.com/v2/update-call/$CALL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything_except_pii",\n "metadata": {\n "customer_id": "cust_123",\n "notes": "Follow-up required"\n },\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
184
184
  },
185
185
  python: {
186
186
  method: 'call.update',
187
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ncall_response = client.call.update(\n call_id="call_a4441234567890777c4a4a123e6",\n data_storage_setting="everything_except_pii",\n metadata={\n "customer_id": "cust_123",\n "notes": "Follow-up required",\n },\n)\nprint(call_response)',
187
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ncall_response = client.call.update(\n call_id="call_a4441234567890777c4a4a123e6",\n data_storage_setting="everything_except_pii",\n metadata={\n "customer_id": "cust_123",\n "notes": "Follow-up required",\n },\n)\nprint(call_response)',
188
188
  },
189
189
  typescript: {
190
190
  method: 'client.call.update',
191
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {\n data_storage_setting: 'everything_except_pii',\n metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },\n});\n\nconsole.log(callResponse);",
191
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {\n data_storage_setting: 'everything_except_pii',\n metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },\n});\n\nconsole.log(callResponse);",
192
192
  },
193
193
  },
194
194
  },
@@ -204,15 +204,15 @@ const EMBEDDED_METHODS = [
204
204
  markdown: "## delete\n\n`client.call.delete(call_id: string): void`\n\n**delete** `/v2/delete-call/{call_id}`\n\nDelete a specific call and its associated data\n\n### Parameters\n\n- `call_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.call.delete('119c3f8e47135a29e65947eeb34cf12d')\n```",
205
205
  perLanguage: {
206
206
  http: {
207
- example: 'curl https://api.retellai.com/v2/delete-call/$CALL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
207
+ example: 'curl https://api.retellai.com/v2/delete-call/$CALL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
208
208
  },
209
209
  python: {
210
210
  method: 'call.delete',
211
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.call.delete(\n "119c3f8e47135a29e65947eeb34cf12d",\n)',
211
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.call.delete(\n "119c3f8e47135a29e65947eeb34cf12d",\n)',
212
212
  },
213
213
  typescript: {
214
214
  method: 'client.call.delete',
215
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.call.delete('119c3f8e47135a29e65947eeb34cf12d');",
215
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.call.delete('119c3f8e47135a29e65947eeb34cf12d');",
216
216
  },
217
217
  },
218
218
  },
@@ -234,15 +234,15 @@ const EMBEDDED_METHODS = [
234
234
  markdown: "## create\n\n`client.chat.create(agent_id: string, agent_version?: number, metadata?: object, retell_llm_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**post** `/create-chat`\n\nCreate a chat session\n\n### Parameters\n\n- `agent_id: string`\n The chat agent to use for the call.\n\n- `agent_version?: number`\n The version of the chat agent to use for the chat. If not provided, will default to latest version.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(chatResponse);\n```",
235
235
  perLanguage: {
236
236
  http: {
237
- example: 'curl https://api.retellai.com/create-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
237
+ example: 'curl https://api.retellai.com/create-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "agent_version": 1,\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
238
238
  },
239
239
  python: {
240
240
  method: 'chat.create',
241
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_response = client.chat.create(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(chat_response.agent_id)',
241
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.create(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(chat_response.agent_id)',
242
242
  },
243
243
  typescript: {
244
244
  method: 'client.chat.create',
245
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(chatResponse.agent_id);",
245
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' });\n\nconsole.log(chatResponse.agent_id);",
246
246
  },
247
247
  },
248
248
  },
@@ -266,15 +266,15 @@ const EMBEDDED_METHODS = [
266
266
  markdown: "## create-sms-chat\n\n`client.chat.createSMSChat(from_number: string, to_number: string, metadata?: object, override_agent_id?: string, override_agent_version?: number, retell_llm_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**post** `/create-sms-chat`\n\nStart an outbound SMS chat conversation with a phone number using the specified agent. The agent must be configured for chat mode. The initial SMS message will be automatically generated and sent based on the agent's configuration.\n\n### Parameters\n\n- `from_number: string`\n The phone number to send SMS from in E.164 format. Must be a number purchased from Retell or imported to Retell with SMS capability.\n\n- `to_number: string`\n The phone number to send SMS to in E.164 format\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object.\n\n- `override_agent_id?: string`\n For this particular chat, override the agent used with this agent id. This does not bind the agent to this number, this is for one time override.\n\n- `override_agent_version?: number`\n For this particular chat, override the agent version used with this version. This does not bind the agent version to this number, this is for one time override.\n\n- `retell_llm_dynamic_variables?: object`\n Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.createSMSChat({ from_number: '+12137771234', to_number: '+14155551234' });\n\nconsole.log(chatResponse);\n```",
267
267
  perLanguage: {
268
268
  http: {
269
- example: 'curl https://api.retellai.com/create-sms-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "from_number": "+12137771234",\n "to_number": "+14155551234",\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "override_agent_version": 1,\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
269
+ example: 'curl https://api.retellai.com/create-sms-chat \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "from_number": "+12137771234",\n "to_number": "+14155551234",\n "override_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "override_agent_version": 1,\n "retell_llm_dynamic_variables": {\n "customer_name": "bar"\n }\n }\'',
270
270
  },
271
271
  python: {
272
272
  method: 'chat.create_sms_chat',
273
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_response = client.chat.create_sms_chat(\n from_number="+12137771234",\n to_number="+14155551234",\n)\nprint(chat_response.agent_id)',
273
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.create_sms_chat(\n from_number="+12137771234",\n to_number="+14155551234",\n)\nprint(chat_response.agent_id)',
274
274
  },
275
275
  typescript: {
276
276
  method: 'client.chat.createSMSChat',
277
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatResponse = await client.chat.createSMSChat({\n from_number: '+12137771234',\n to_number: '+14155551234',\n});\n\nconsole.log(chatResponse.agent_id);",
277
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.createSMSChat({\n from_number: '+12137771234',\n to_number: '+14155551234',\n});\n\nconsole.log(chatResponse.agent_id);",
278
278
  },
279
279
  },
280
280
  },
@@ -290,15 +290,15 @@ const EMBEDDED_METHODS = [
290
290
  markdown: "## end\n\n`client.chat.end(chat_id: string): void`\n\n**patch** `/end-chat/{chat_id}`\n\nEnd an ongoing chat\n\n### Parameters\n\n- `chat_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.chat.end('16b980523634a6dc504898cda492e939')\n```",
291
291
  perLanguage: {
292
292
  http: {
293
- example: 'curl https://api.retellai.com/end-chat/$CHAT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $API_KEY"',
293
+ example: 'curl https://api.retellai.com/end-chat/$CHAT_ID \\\n -X PATCH \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
294
294
  },
295
295
  python: {
296
296
  method: 'chat.end',
297
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.chat.end(\n "16b980523634a6dc504898cda492e939",\n)',
297
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat.end(\n "16b980523634a6dc504898cda492e939",\n)',
298
298
  },
299
299
  typescript: {
300
300
  method: 'client.chat.end',
301
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.chat.end('16b980523634a6dc504898cda492e939');",
301
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chat.end('16b980523634a6dc504898cda492e939');",
302
302
  },
303
303
  },
304
304
  },
@@ -315,15 +315,15 @@ const EMBEDDED_METHODS = [
315
315
  markdown: "## retrieve\n\n`client.chat.retrieve(chat_id: string): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**get** `/get-chat/{chat_id}`\n\nRetrieve details of a specific chat\n\n### Parameters\n\n- `chat_id: string`\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatResponse);\n```",
316
316
  perLanguage: {
317
317
  http: {
318
- example: 'curl https://api.retellai.com/get-chat/$CHAT_ID \\\n -H "Authorization: Bearer $API_KEY"',
318
+ example: 'curl https://api.retellai.com/get-chat/$CHAT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
319
319
  },
320
320
  python: {
321
321
  method: 'chat.retrieve',
322
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_response = client.chat.retrieve(\n "16b980523634a6dc504898cda492e939",\n)\nprint(chat_response.agent_id)',
322
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.retrieve(\n "16b980523634a6dc504898cda492e939",\n)\nprint(chat_response.agent_id)',
323
323
  },
324
324
  typescript: {
325
325
  method: 'client.chat.retrieve',
326
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatResponse.agent_id);",
326
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatResponse.agent_id);",
327
327
  },
328
328
  },
329
329
  },
@@ -340,15 +340,15 @@ const EMBEDDED_METHODS = [
340
340
  markdown: "## create-chat-completion\n\n`client.chat.createChatCompletion(chat_id: string, content: string): { messages: object | object | object | object | object[]; }`\n\n**post** `/create-chat-completion`\n\nCreate a chat completion message\n\n### Parameters\n\n- `chat_id: string`\n Unique id of the chat to create completion.\n\n- `content: string`\n user message to generate agent chat completion.\n\n### Returns\n\n- `{ messages: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]; }`\n\n - `messages: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst response = await client.chat.createChatCompletion({ chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', content: 'hi how are you doing?' });\n\nconsole.log(response);\n```",
341
341
  perLanguage: {
342
342
  http: {
343
- example: 'curl https://api.retellai.com/create-chat-completion \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n --max-time 300 \\\n -d \'{\n "chat_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "content": "hi how are you doing?"\n }\'',
343
+ example: 'curl https://api.retellai.com/create-chat-completion \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "chat_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "content": "hi how are you doing?"\n }\'',
344
344
  },
345
345
  python: {
346
346
  method: 'chat.create_chat_completion',
347
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nresponse = client.chat.create_chat_completion(\n chat_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n content="hi how are you doing?",\n)\nprint(response.messages)',
347
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.chat.create_chat_completion(\n chat_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n content="hi how are you doing?",\n)\nprint(response.messages)',
348
348
  },
349
349
  typescript: {
350
350
  method: 'client.chat.createChatCompletion',
351
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst response = await client.chat.createChatCompletion({\n chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n content: 'hi how are you doing?',\n});\n\nconsole.log(response.messages);",
351
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.chat.createChatCompletion({\n chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n content: 'hi how are you doing?',\n});\n\nconsole.log(response.messages);",
352
352
  },
353
353
  },
354
354
  },
@@ -365,15 +365,15 @@ const EMBEDDED_METHODS = [
365
365
  markdown: "## list\n\n`client.chat.list(limit?: number, pagination_key?: string, sort_order?: 'ascending' | 'descending'): object[]`\n\n**get** `/list-chat`\n\nList all chats\n\n### Parameters\n\n- `limit?: number`\n Limit the number of chats returned. Default 50, Max 1000. To retrieve more than 1000, use pagination_key to continue fetching the next page.\n\n- `pagination_key?: string`\n The pagination key to continue fetching the next page of chats. Pagination key is represented by a chat id here, and it's exclusive (not included in the fetched chats). The last chat id from the list chats is usually used as pagination key here. If not set, will start from the beginning.\n\n- `sort_order?: 'ascending' | 'descending'`\n The chats will be sorted by `start_timestamp`, whether to return the chats in ascending or descending order.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: object[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponses = await client.chat.list();\n\nconsole.log(chatResponses);\n```",
366
366
  perLanguage: {
367
367
  http: {
368
- example: 'curl https://api.retellai.com/list-chat \\\n -H "Authorization: Bearer $API_KEY" \\\n --max-time 300',
368
+ example: 'curl https://api.retellai.com/list-chat \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300',
369
369
  },
370
370
  python: {
371
371
  method: 'chat.list',
372
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_responses = client.chat.list()\nprint(chat_responses)',
372
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_responses = client.chat.list()\nprint(chat_responses)',
373
373
  },
374
374
  typescript: {
375
375
  method: 'client.chat.list',
376
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatResponses = await client.chat.list();\n\nconsole.log(chatResponses);",
376
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponses = await client.chat.list();\n\nconsole.log(chatResponses);",
377
377
  },
378
378
  },
379
379
  },
@@ -396,15 +396,15 @@ const EMBEDDED_METHODS = [
396
396
  markdown: "## update\n\n`client.chat.update(chat_id: string, custom_attributes?: object, data_storage_setting?: 'everything' | 'basic_attributes_only', metadata?: object, override_dynamic_variables?: object): { agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: object; chat_cost?: object; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: object | object | object | object | object[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n**patch** `/update-chat/{chat_id}`\n\nUpdate metadata and sensitive data storage settings for an existing chat.\n\n### Parameters\n\n- `chat_id: string`\n\n- `custom_attributes?: object`\n Custom attributes for the chat\n\n- `data_storage_setting?: 'everything' | 'basic_attributes_only'`\n Data storage setting for this chat. Overrides the agent's default setting. \"everything\" stores all data, \"basic_attributes_only\" stores only metadata. Cannot be downgraded from more restrictive to less restrictive settings.\n\n- `metadata?: object`\n An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the chat. Not used for processing. You can later get this field from the chat object. Size limited to 50kB max.\n\n- `override_dynamic_variables?: object`\n Override dynamic varaibles represented as key-value pairs of strings. Setting this will override or add the dynamic variables set in the agent during the call. Only need to set the delta where you want to override, no need to set the entire dynamic variables object. Setting this to null will remove any existing override.\n\n### Returns\n\n- `{ agent_id: string; chat_id: string; chat_status: 'ongoing' | 'ended' | 'error'; chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }; chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }; chat_type?: 'api_chat' | 'sms_chat'; collected_dynamic_variables?: object; custom_attributes?: object; end_timestamp?: number; message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]; metadata?: object; retell_llm_dynamic_variables?: object; start_timestamp?: number; transcript?: string; version?: number; }`\n\n - `agent_id: string`\n - `chat_id: string`\n - `chat_status: 'ongoing' | 'ended' | 'error'`\n - `chat_analysis?: { chat_successful?: boolean; chat_summary?: string; custom_analysis_data?: object; user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown'; }`\n - `chat_cost?: { combined_cost?: number; product_costs?: { cost: number; product: string; is_transfer_leg_cost?: boolean; unit_price?: number; }[]; }`\n - `chat_type?: 'api_chat' | 'sms_chat'`\n - `collected_dynamic_variables?: object`\n - `custom_attributes?: object`\n - `end_timestamp?: number`\n - `message_with_tool_calls?: { content: string; created_timestamp: number; message_id: string; role: 'agent' | 'user'; } | { arguments: string; message_id: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; created_timestamp?: number; thought_signature?: string; } | { content: string; created_timestamp: number; message_id: string; role: 'tool_call_result'; tool_call_id: string; successful?: boolean; } | { created_timestamp: number; message_id: string; role: 'node_transition'; former_node_id?: string; former_node_name?: string; new_node_id?: string; new_node_name?: string; } | { created_timestamp: number; message_id: string; role: 'state_transition'; former_state_name?: string; new_state_name?: string; }[]`\n - `metadata?: object`\n - `retell_llm_dynamic_variables?: object`\n - `start_timestamp?: number`\n - `transcript?: string`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatResponse = await client.chat.update('chat_98c1a2157aa0559144d67bb0729');\n\nconsole.log(chatResponse);\n```",
397
397
  perLanguage: {
398
398
  http: {
399
- example: 'curl https://api.retellai.com/update-chat/$CHAT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything",\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
399
+ example: 'curl https://api.retellai.com/update-chat/$CHAT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "custom_attributes": {\n "custom_attribute_1": "value1",\n "custom_attribute_2": "value2"\n },\n "data_storage_setting": "everything",\n "override_dynamic_variables": {\n "additional_discount": "15%"\n }\n }\'',
400
400
  },
401
401
  python: {
402
402
  method: 'chat.update',
403
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_response = client.chat.update(\n chat_id="chat_98c1a2157aa0559144d67bb0729",\n data_storage_setting="everything",\n metadata={\n "customer_id": "cust_123",\n "notes": "Follow-up required",\n },\n override_dynamic_variables={\n "additional_discount": "15%"\n },\n)\nprint(chat_response.agent_id)',
403
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_response = client.chat.update(\n chat_id="chat_98c1a2157aa0559144d67bb0729",\n data_storage_setting="everything",\n metadata={\n "customer_id": "cust_123",\n "notes": "Follow-up required",\n },\n override_dynamic_variables={\n "additional_discount": "15%"\n },\n)\nprint(chat_response.agent_id)',
404
404
  },
405
405
  typescript: {
406
406
  method: 'client.chat.update',
407
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatResponse = await client.chat.update('chat_98c1a2157aa0559144d67bb0729', {\n data_storage_setting: 'everything',\n metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },\n override_dynamic_variables: { additional_discount: '15%' },\n});\n\nconsole.log(chatResponse.agent_id);",
407
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatResponse = await client.chat.update('chat_98c1a2157aa0559144d67bb0729', {\n data_storage_setting: 'everything',\n metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },\n override_dynamic_variables: { additional_discount: '15%' },\n});\n\nconsole.log(chatResponse.agent_id);",
408
408
  },
409
409
  },
410
410
  },
@@ -439,15 +439,15 @@ const EMBEDDED_METHODS = [
439
439
  markdown: "## create\n\n`client.phoneNumber.create(allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], area_code?: number, country_code?: 'US' | 'CA', fallback_number?: string, inbound_agent_id?: string, inbound_agent_version?: number, inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[], inbound_webhook_url?: string, nickname?: string, number_provider?: 'twilio' | 'telnyx', outbound_agent_id?: string, outbound_agent_version?: number, outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[], phone_number?: string, toll_free?: boolean, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/create-phone-number`\n\nBuy a new phone number & Bind agents\n\n### Parameters\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `area_code?: number`\n Area code of the number to obtain. Format is a 3 digit integer. Currently only supports US area code.\n\n- `country_code?: 'US' | 'CA'`\n The ISO 3166-1 alpha-2 country code of the number you are trying to purchase. If left empty, will default to \"US\".\n\n- `fallback_number?: string`\n Enterprise only. Phone number to transfer inbound calls to when organization is in outage mode. Can be either a Retell phone number or an external number. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agent_id?: string`\n Unique id of agent to bind to the number. The number will automatically use the agent when receiving inbound calls. If null, this number would not accept inbound call. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `inbound_agent_version?: number`\n Version of the inbound agent to bind to the number. If not provided, will default to latest version. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to inbound_agent_id.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can to override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `number_provider?: 'twilio' | 'telnyx'`\n The provider to purchase the phone number from. Default to twilio.\n\n- `outbound_agent_id?: string`\n Unique id of agent to bind to the number. The number will automatically use the agent when conducting outbound calls. If null, this number would not be able to initiate outbound call without agent id override. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `outbound_agent_version?: number`\n Version of the outbound agent to bind to the number. If not provided, will default to latest version. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to outbound_agent_id.\n\n- `phone_number?: string`\n The number you are trying to purchase in E.164 format of the number (+country code then number with no space and no special characters).\n\n- `toll_free?: boolean`\n Whether to purchase a toll-free number. Toll-free numbers incur higher costs.\n\n- `transport?: string`\n Outbound transport protocol to use for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agent_id?: string`\n - `inbound_agent_version?: number`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agent_id?: string`\n - `outbound_agent_version?: number`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.create();\n\nconsole.log(phoneNumberResponse);\n```",
440
440
  perLanguage: {
441
441
  http: {
442
- example: 'curl https://api.retellai.com/create-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "area_code": 415,\n "country_code": "US",\n "fallback_number": "+14155551234",\n "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "inbound_agent_version": 1,\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "number_provider": "twilio",\n "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "outbound_agent_version": 1,\n "phone_number": "+14157774444",\n "transport": "TCP"\n }\'',
442
+ example: 'curl https://api.retellai.com/create-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "area_code": 415,\n "country_code": "US",\n "fallback_number": "+14155551234",\n "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "inbound_agent_version": 1,\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "number_provider": "twilio",\n "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "outbound_agent_version": 1,\n "phone_number": "+14157774444",\n "transport": "TCP"\n }\'',
443
443
  },
444
444
  python: {
445
445
  method: 'phone_number.create',
446
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nphone_number_response = client.phone_number.create()\nprint(phone_number_response.inbound_agent_id)',
446
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.create()\nprint(phone_number_response.inbound_agent_id)',
447
447
  },
448
448
  typescript: {
449
449
  method: 'client.phoneNumber.create',
450
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst phoneNumberResponse = await client.phoneNumber.create();\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
450
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.create();\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
451
451
  },
452
452
  },
453
453
  },
@@ -481,15 +481,15 @@ const EMBEDDED_METHODS = [
481
481
  markdown: "## import\n\n`client.phoneNumber.import(phone_number: string, termination_uri: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], ignore_e164_validation?: boolean, inbound_agent_id?: string, inbound_agent_version?: number, inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[], inbound_webhook_url?: string, nickname?: string, outbound_agent_id?: string, outbound_agent_version?: number, outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[], sip_trunk_auth_password?: string, sip_trunk_auth_username?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/import-phone-number`\n\nImport a phone number from custom telephony & Bind agents\n\n### Parameters\n\n- `phone_number: string`\n The number you are trying to import in E.164 format of the number (+country code, then number with no space, no special characters), used as the unique identifier for phone number APIs.\n\n- `termination_uri: string`\n The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always end with \".pstn.twilio.com\".\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `ignore_e164_validation?: boolean`\n If true, E.164 validation for phone_number is skipped. This is useful for internal pseudo numbers when using custom telephony. If omitted, default is true. Must be a boolean literal; string values like \"true\" or \"false\" are invalid.\n\n- `inbound_agent_id?: string`\n Unique id of agent to bind to the number. The number will automatically use the agent when receiving inbound calls. If null, this number would not accept inbound call. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `inbound_agent_version?: number`\n Version of the inbound agent to bind to the number. If not provided, will default to latest version. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to inbound_agent_id.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can to override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agent_id?: string`\n Unique id of agent to bind to the number. The number will automatically use the agent when conducting outbound calls. If null, this number would not be able to initiate outbound call without agent id override. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `outbound_agent_version?: number`\n Version of the outbound agent to bind to the number. If not provided, will default to latest version. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to outbound_agent_id.\n\n- `sip_trunk_auth_password?: string`\n The password used for authentication for the SIP trunk.\n\n- `sip_trunk_auth_username?: string`\n The username used for authentication for the SIP trunk.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agent_id?: string`\n - `inbound_agent_version?: number`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agent_id?: string`\n - `outbound_agent_version?: number`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.import({ phone_number: '+14157774444', termination_uri: 'someuri.pstn.twilio.com' });\n\nconsole.log(phoneNumberResponse);\n```",
482
482
  perLanguage: {
483
483
  http: {
484
- example: 'curl https://api.retellai.com/import-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "phone_number": "+14157774444",\n "termination_uri": "someuri.pstn.twilio.com",\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "ignore_e164_validation": true,\n "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "inbound_agent_version": 1,\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "outbound_agent_version": 1,\n "sip_trunk_auth_password": "123456",\n "sip_trunk_auth_username": "username",\n "transport": "TCP"\n }\'',
484
+ example: 'curl https://api.retellai.com/import-phone-number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "phone_number": "+14157774444",\n "termination_uri": "someuri.pstn.twilio.com",\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "ignore_e164_validation": true,\n "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "inbound_agent_version": 1,\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "outbound_agent_version": 1,\n "sip_trunk_auth_password": "123456",\n "sip_trunk_auth_username": "username",\n "transport": "TCP"\n }\'',
485
485
  },
486
486
  python: {
487
487
  method: 'phone_number.import_',
488
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nphone_number_response = client.phone_number.import_(\n phone_number="+14157774444",\n termination_uri="someuri.pstn.twilio.com",\n)\nprint(phone_number_response.inbound_agent_id)',
488
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.import_(\n phone_number="+14157774444",\n termination_uri="someuri.pstn.twilio.com",\n)\nprint(phone_number_response.inbound_agent_id)',
489
489
  },
490
490
  typescript: {
491
491
  method: 'client.phoneNumber.import',
492
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst phoneNumberResponse = await client.phoneNumber.import({\n phone_number: '+14157774444',\n termination_uri: 'someuri.pstn.twilio.com',\n});\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
492
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.import({\n phone_number: '+14157774444',\n termination_uri: 'someuri.pstn.twilio.com',\n});\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
493
493
  },
494
494
  },
495
495
  },
@@ -506,15 +506,15 @@ const EMBEDDED_METHODS = [
506
506
  markdown: "## retrieve\n\n`client.phoneNumber.retrieve(phone_number: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**get** `/get-phone-number/{phone_number}`\n\nRetrieve details of a specific phone number\n\n### Parameters\n\n- `phone_number: string`\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agent_id?: string`\n - `inbound_agent_version?: number`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agent_id?: string`\n - `outbound_agent_version?: number`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.retrieve('+14157774444');\n\nconsole.log(phoneNumberResponse);\n```",
507
507
  perLanguage: {
508
508
  http: {
509
- example: 'curl https://api.retellai.com/get-phone-number/$PHONE_NUMBER \\\n -H "Authorization: Bearer $API_KEY"',
509
+ example: 'curl https://api.retellai.com/get-phone-number/$PHONE_NUMBER \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
510
510
  },
511
511
  python: {
512
512
  method: 'phone_number.retrieve',
513
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nphone_number_response = client.phone_number.retrieve(\n "+14157774444",\n)\nprint(phone_number_response.inbound_agent_id)',
513
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.retrieve(\n "+14157774444",\n)\nprint(phone_number_response.inbound_agent_id)',
514
514
  },
515
515
  typescript: {
516
516
  method: 'client.phoneNumber.retrieve',
517
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst phoneNumberResponse = await client.phoneNumber.retrieve('+14157774444');\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
517
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.retrieve('+14157774444');\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
518
518
  },
519
519
  },
520
520
  },
@@ -530,15 +530,15 @@ const EMBEDDED_METHODS = [
530
530
  markdown: "## list\n\n`client.phoneNumber.list(): object[]`\n\n**get** `/list-phone-numbers`\n\nList all phone numbers\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponses = await client.phoneNumber.list();\n\nconsole.log(phoneNumberResponses);\n```",
531
531
  perLanguage: {
532
532
  http: {
533
- example: 'curl https://api.retellai.com/list-phone-numbers \\\n -H "Authorization: Bearer $API_KEY"',
533
+ example: 'curl https://api.retellai.com/list-phone-numbers \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
534
534
  },
535
535
  python: {
536
536
  method: 'phone_number.list',
537
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nphone_number_responses = client.phone_number.list()\nprint(phone_number_responses)',
537
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_responses = client.phone_number.list()\nprint(phone_number_responses)',
538
538
  },
539
539
  typescript: {
540
540
  method: 'client.phoneNumber.list',
541
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst phoneNumberResponses = await client.phoneNumber.list();\n\nconsole.log(phoneNumberResponses);",
541
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponses = await client.phoneNumber.list();\n\nconsole.log(phoneNumberResponses);",
542
542
  },
543
543
  },
544
544
  },
@@ -575,15 +575,15 @@ const EMBEDDED_METHODS = [
575
575
  markdown: "## update\n\n`client.phoneNumber.update(phone_number: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], auth_password?: string, auth_username?: string, fallback_number?: string, inbound_agent_id?: string, inbound_agent_version?: number, inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[], inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[], inbound_sms_webhook_url?: string, inbound_webhook_url?: string, nickname?: string, outbound_agent_id?: string, outbound_agent_version?: number, outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[], outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[], termination_uri?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**patch** `/update-phone-number/{phone_number}`\n\nUpdate agent bound to a purchased phone number\n\n### Parameters\n\n- `phone_number: string`\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `auth_password?: string`\n The password used for authentication for the SIP trunk to update for the phone number.\n\n- `auth_username?: string`\n The username used for authentication for the SIP trunk to update for the phone number.\n\n- `fallback_number?: string`\n Enterprise only. Phone number to transfer inbound calls to when organization is in outage mode. Can be either a Retell phone number or an external number. Set to null to remove. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agent_id?: string`\n Unique id of agent to bind to the number. The number will automatically use the agent when receiving inbound calls. If set to null, this number would not accept inbound call. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `inbound_agent_version?: number`\n Version of the inbound agent to bind to the number. If not provided, will default to latest version. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to inbound_agent_id.\n\n- `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Inbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to inbound_sms_agent_id.\n\n- `inbound_sms_webhook_url?: string`\n If set, will send a webhook for inbound SMS, where you can override agent id, set dynamic variables and other fields specific to that chat.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can to override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agent_id?: string`\n Unique id of agent to bind to the number. The number will automatically use the agent when conducting outbound calls. If set to null, this number would not be able to initiate outbound call without agent id override. Deprecated. See https://docs.retellai.com/deprecation-notice/2026/03-31_phone_number_agent_fields\n\n- `outbound_agent_version?: number`\n Version of the outbound agent to bind to the number. If not provided, will default to latest version.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to outbound_agent_id.\n\n- `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n Outbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to outbound_sms_agent_id.\n\n- `termination_uri?: string`\n The termination uri to update for the phone number. This is used for outbound calls.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agent_id?: string; inbound_agent_version?: number; inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agent_id?: string; outbound_agent_version?: number; outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agent_id?: string`\n - `inbound_agent_version?: number`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agent_id?: string`\n - `outbound_agent_version?: number`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.update('+14157774444');\n\nconsole.log(phoneNumberResponse);\n```",
576
576
  perLanguage: {
577
577
  http: {
578
- example: 'curl https://api.retellai.com/update-phone-number/$PHONE_NUMBER \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "auth_password": "123456",\n "auth_username": "username",\n "fallback_number": "+14155551234",\n "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "inbound_agent_version": 1,\n "inbound_sms_webhook_url": "https://example.com/inbound-sms-webhook",\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "outbound_agent_version": 1,\n "termination_uri": "someuri.pstn.twilio.com",\n "transport": "TCP"\n }\'',
578
+ example: 'curl https://api.retellai.com/update-phone-number/$PHONE_NUMBER \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "allowed_inbound_country_list": [\n "US",\n "CA",\n "GB"\n ],\n "allowed_outbound_country_list": [\n "US",\n "CA"\n ],\n "auth_password": "123456",\n "auth_username": "username",\n "fallback_number": "+14155551234",\n "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "inbound_agent_version": 1,\n "inbound_sms_webhook_url": "https://example.com/inbound-sms-webhook",\n "inbound_webhook_url": "https://example.com/inbound-webhook",\n "nickname": "Frontdesk Number",\n "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n "outbound_agent_version": 1,\n "termination_uri": "someuri.pstn.twilio.com",\n "transport": "TCP"\n }\'',
579
579
  },
580
580
  python: {
581
581
  method: 'phone_number.update',
582
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nphone_number_response = client.phone_number.update(\n phone_number="+14157774444",\n inbound_agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n nickname="Frontdesk Number",\n outbound_agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(phone_number_response.inbound_agent_id)',
582
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nphone_number_response = client.phone_number.update(\n phone_number="+14157774444",\n inbound_agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n nickname="Frontdesk Number",\n outbound_agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)\nprint(phone_number_response.inbound_agent_id)',
583
583
  },
584
584
  typescript: {
585
585
  method: 'client.phoneNumber.update',
586
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst phoneNumberResponse = await client.phoneNumber.update('+14157774444', {\n inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n nickname: 'Frontdesk Number',\n outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
586
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst phoneNumberResponse = await client.phoneNumber.update('+14157774444', {\n inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n nickname: 'Frontdesk Number',\n outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',\n});\n\nconsole.log(phoneNumberResponse.inbound_agent_id);",
587
587
  },
588
588
  },
589
589
  },
@@ -599,15 +599,15 @@ const EMBEDDED_METHODS = [
599
599
  markdown: "## delete\n\n`client.phoneNumber.delete(phone_number: string): void`\n\n**delete** `/delete-phone-number/{phone_number}`\n\nDelete an existing phone number\n\n### Parameters\n\n- `phone_number: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.phoneNumber.delete('+14157774444')\n```",
600
600
  perLanguage: {
601
601
  http: {
602
- example: 'curl https://api.retellai.com/delete-phone-number/$PHONE_NUMBER \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
602
+ example: 'curl https://api.retellai.com/delete-phone-number/$PHONE_NUMBER \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
603
603
  },
604
604
  python: {
605
605
  method: 'phone_number.delete',
606
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.phone_number.delete(\n "+14157774444",\n)',
606
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.phone_number.delete(\n "+14157774444",\n)',
607
607
  },
608
608
  typescript: {
609
609
  method: 'client.phoneNumber.delete',
610
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.phoneNumber.delete('+14157774444');",
610
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.phoneNumber.delete('+14157774444');",
611
611
  },
612
612
  },
613
613
  },
@@ -681,15 +681,15 @@ const EMBEDDED_METHODS = [
681
681
  markdown: "## create\n\n`client.agent.create(response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, voice_id: string, agent_name?: string, allow_user_dtmf?: boolean, ambient_sound?: string, ambient_sound_volume?: number, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, backchannel_frequency?: number, backchannel_words?: string[], begin_message_delay_ms?: number, boosted_keywords?: string[], custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation', enable_backchannel?: boolean, enable_dynamic_responsiveness?: boolean, enable_dynamic_voice_speed?: boolean, end_call_after_silence_ms?: number, fallback_voice_ids?: string[], guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }, interruption_sensitivity?: number, is_public?: boolean, ivr_option?: { action: { type: 'hangup'; }; }, language?: string, max_call_duration_ms?: number, normalize_for_speech?: boolean, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_call_analysis_model?: string, pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[], reminder_max_count?: number, reminder_trigger_ms?: number, responsiveness?: number, ring_duration_ms?: number, signed_url_expiration_ms?: number, stt_mode?: 'fast' | 'accurate' | 'custom', timezone?: string, user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }, version_description?: string, vocab_specialization?: 'general' | 'medical', voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised', voice_model?: string, voice_speed?: number, voice_temperature?: number, voicemail_detection_timeout_ms?: number, voicemail_message?: string, voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }, volume?: number, webhook_events?: string[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: object; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**post** `/create-agent`\n\nCreate a new agent\n\n### Parameters\n\n- `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `voice_id: string`\n Unique voice id used for the agent. Find list of available voices and their preview in Dashboard.\n\n- `agent_name?: string`\n The name of the agent. Only used for your own reference.\n\n- `allow_user_dtmf?: boolean`\n If set to true, DTMF input will be accepted and processed. If false, any DTMF input will be ignored. Default to true.\n\n- `ambient_sound?: string`\n If set, will add ambient environment sound to the call to make experience more realistic. Currently supports the following options:\n\n- `coffee-shop`: Coffee shop ambience with people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)\n- `convention-hall`: Convention hall ambience, with some echo and people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)\n- `summer-outdoor`: Summer outdoor ambience with cicada chirping. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)\n- `mountain-outdoor`: Mountain outdoor ambience with birds singing. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)\n- `static-noise`: Constant static noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)\n- `call-center`: Call center work noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)\nSet to `null` to remove ambient sound from this agent.\n\n- `ambient_sound_volume?: number`\n If set, will control the volume of the ambient sound. Value ranging from [0,2]. Lower value means quieter ambient sound, while higher value means louder ambient sound. If unset, default value 1 will apply.\n\n- `analysis_successful_prompt?: string`\n Prompt to determine whether the post call or chat analysis should mark the interaction as successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n Prompt to guide how the post call or chat analysis summary should be generated. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post call or chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `backchannel_frequency?: number`\n Only applicable when enable_backchannel is true. Controls how often the agent would backchannel when a backchannel is possible. Value ranging from [0,1]. Lower value means less frequent backchannel, while higher value means more frequent backchannel. If unset, default value 0.8 will apply.\n\n- `backchannel_words?: string[]`\n Only applicable when enable_backchannel is true. A list of words that the agent would use as backchannel. If not set, default backchannel words will apply. Check out [backchannel default words](/agent/interaction-configuration#backchannel) for more details. Note that certain voices do not work too well with certain words, so it's recommended to experiment before adding any words.\n\n- `begin_message_delay_ms?: number`\n If set, will delay the first message by the specified amount of milliseconds, so that it gives user more time to prepare to take the call. Valid range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only applicable when agent speaks first.\n\n- `boosted_keywords?: string[]`\n Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, street, etc.\n\n- `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }`\n Custom STT configuration. Only used when stt_mode is set to custom.\n - `endpointing_ms: number`\n Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.\n - `provider: 'azure' | 'deepgram'`\n The STT provider to use.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Granular setting to manage how Retell stores sensitive data (transcripts, recordings, logs, etc.).\nThis replaces the deprecated `opt_out_sensitive_data_storage` field.\n- `everything`: Store all data including transcripts, recordings, and logs.\n- `everything_except_pii`: Store data without PII when PII is detected.\n- `basic_attributes_only`: Store only basic attributes; no transcripts/recordings/logs.\nIf not set, default value of \"everything\" will apply.\n\n- `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n If set, determines what denoising mode to use. Use \"no-denoise\" to bypass all audio denoising. Default to noise-cancellation.\n\n- `enable_backchannel?: boolean`\n Controls whether the agent would backchannel (agent interjects the speaker with phrases like \"yeah\", \"uh-huh\" to signify interest and engagement). Backchannel when enabled tends to show up more in longer user utterances. If not set, agent will not backchannel.\n\n- `enable_dynamic_responsiveness?: boolean`\n If set to true, the agent will dynamically adjust how quickly it responds based on the user's speech rate and past turn-taking behavior in the call. If unset, default value false will apply.\n\n- `enable_dynamic_voice_speed?: boolean`\n If set to true, will enable dynamic voice speed adjustment based on the user's speech rate and conversation context. If unset, default value false will apply.\n\n- `end_call_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the call. The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).\n\n- `fallback_voice_ids?: string[]`\n When TTS provider for the selected voice is experiencing outages, we would use fallback voices listed here for the agent. Voice id and the fallback voice ids must be from different TTS providers. The system would go through the list in order, if the first one in the list is also having outage, it would use the next one. Set to null to remove voice fallback for the agent.\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `echo_verification?: boolean`\n Repeat back and confirm important details (voice only).\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `nato_phonetic_alphabet?: boolean`\n Spell using NATO phonetic alphabet style (voice only).\n - `natural_filler_words?: boolean`\n Sprinkle natural speech fillers like \"um\", \"you know\" for a more human, conversational tone.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n - `smart_matching?: boolean`\n Treat near-match similar words as same entity to reduce impact of transcription error (voice only).\n - `speech_normalization?: boolean`\n Convert numbers/dates/currency to spoken forms (voice only).\n\n- `interruption_sensitivity?: number`\n Controls how sensitive the agent is to user interruptions. Value ranging from [0,1]. Lower value means it will take longer / more words for user to interrupt agent, while higher value means it's easier for user to interrupt agent. If unset, default value 1 will apply. When this is set to 0, agent would never be interrupted.\n\n- `is_public?: boolean`\n Whether the agent is public. When set to true, the agent is available for public agent preview link.\n\n- `ivr_option?: { action: { type: 'hangup'; }; }`\n If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection.\n - `action: { type: 'hangup'; }`\n\n- `language?: string`\n Specifies what language (and dialect) the speech recognition will operate in. For instance, selecting `en-GB` optimizes speech recognition for British English. If unset, will use default value `en-US`. Select `multi` for multilingual support.\n\n- `max_call_duration_ms?: number`\n Maximum allowed length for the call, will force end the call if reached. The minimum value allowed is 60,000 ms (1 min), and maximum value allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `normalize_for_speech?: boolean`\n If set to true, will normalize the some part of text (number, currency, date, etc) to spoken to its spoken form for more consistent speech synthesis (sometimes the voice synthesize system itself might read these wrong with the raw text). For example, it will convert \"Call my number 2137112342 on Jul 5th, 2024 for the $24.12 payment\" to \"Call my number two one three seven one one two three four two on july fifth, twenty twenty four for the twenty four dollars twelve cents payment\" before starting audio generation.\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in for signed URLs for public logs and recordings. When enabled, the generated URLs will include security signatures that restrict access and automatically expire after 24 hours.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post call analysis data to extract from the call. This data will augment the pre-defined variables extracted in the call analysis. This will be available after the call ends.\n\n- `post_call_analysis_model?: string`\n The model to use for post call analysis. Default to gpt-4.1-mini.\n\n- `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n A list of words / phrases and their pronunciation to be used to guide the audio synthesize for consistent pronunciation. Check the dashboard to see what provider supports this feature. Set to null to remove pronunciation dictionary from this agent.\n\n- `reminder_max_count?: number`\n If set, controls how many times agent would remind user when user is unresponsive. Must be a non negative integer. If unset, default value of 1 will apply (remind once). Set to 0 to disable agent from reminding.\n\n- `reminder_trigger_ms?: number`\n If set (in milliseconds), will trigger a reminder to the agent to speak if the user has been silent for the specified duration after some agent speech. Must be a positive number. If unset, default value of 10000 ms (10 s) will apply.\n\n- `responsiveness?: number`\n Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.\n\n- `ring_duration_ms?: number`\n If set, the phone ringing will last for the specified amount of milliseconds. This applies for both outbound call ringtime, and call transfer ringtime. Default to 30000 (30 s). Valid range is [5000, 300000].\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `stt_mode?: 'fast' | 'accurate' | 'custom'`\n If set, determines whether speech to text should focus on latency or accuracy. Default to fast mode. When set to custom, custom_stt_config must be provided.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `digit_limit?: number`\n The maximum number of digits allowed in the user's DTMF (Dual-Tone Multi-Frequency) input per turn. Once this limit is reached, the input is considered complete and a response will be generated immediately.\n - `termination_key?: string`\n A single key that signals the end of DTMF input. Acceptable values include any digit (0-9), the pound/hash symbol (#), or the asterisk (*).\n - `timeout_ms?: number`\n The time (in milliseconds) to wait for user DTMF input before timing out. The timer resets with each digit received.\n\n- `version_description?: string`\n Optional description of the agent version. Used for your own reference and documentation.\n\n- `vocab_specialization?: 'general' | 'medical'`\n If set, determines the vocabulary set to use for transcription. This setting only applies for English agents, for non English agent, this setting is a no-op. Default to general.\n\n- `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n Controls the emotional tone of the agent's voice. Currently supported for Cartesia and Minimax TTS providers. If unset, no emotion will be used.\n\n- `voice_model?: string`\n Select the voice model used for the selected voice. Each provider has a set of available voice models. Set to null to remove voice model selection, and default ones will apply. Check out dashboard for more details of each voice model.\n\n- `voice_speed?: number`\n Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.\n\n- `voice_temperature?: number`\n Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Check the dashboard to see what provider supports this feature. If unset, default value 1 will apply.\n\n- `voicemail_detection_timeout_ms?: number`\n Configures when to stop running voicemail detection, as it becomes unlikely to hit voicemail after a couple minutes, and keep running it will only have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).\n\n- `voicemail_message?: string`\n The message to be played when the call enters a voicemail. Note that this feature is only available for phone calls. If you want to hangup after hitting voicemail, set this to empty string.\n\n- `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }`\n If this option is set, the call will try to detect voicemail in the first 3 minutes of the call. Actions defined (hangup, or leave a message) will be applied when the voicemail is detected. Set this to null to disable voicemail detection.\n - `action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }`\n\n- `volume?: number`\n If set, will control the volume of the agent. Value ranging from [0,2]. Lower value means quieter agent speech, while higher value means louder agent speech. If unset, default value 1 will apply.\n\n- `webhook_events?: string[]`\n Which webhook events this agent should receive. If not set, defaults to call_started, call_ended, call_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `version: number`\n - `voice_id: string`\n - `agent_name?: string`\n - `allow_user_dtmf?: boolean`\n - `ambient_sound?: string`\n - `ambient_sound_volume?: number`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `backchannel_frequency?: number`\n - `backchannel_words?: string[]`\n - `begin_message_delay_ms?: number`\n - `boosted_keywords?: string[]`\n - `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n - `enable_backchannel?: boolean`\n - `enable_dynamic_responsiveness?: boolean`\n - `enable_dynamic_voice_speed?: boolean`\n - `end_call_after_silence_ms?: number`\n - `fallback_voice_ids?: string[]`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n - `interruption_sensitivity?: number`\n - `is_public?: boolean`\n - `is_published?: boolean`\n - `ivr_option?: { action: { type: 'hangup'; }; }`\n - `language?: string`\n - `max_call_duration_ms?: number`\n - `normalize_for_speech?: boolean`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_call_analysis_model?: string`\n - `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n - `reminder_max_count?: number`\n - `reminder_trigger_ms?: number`\n - `responsiveness?: number`\n - `ring_duration_ms?: number`\n - `signed_url_expiration_ms?: number`\n - `stt_mode?: 'fast' | 'accurate' | 'custom'`\n - `timezone?: string`\n - `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `version_description?: string`\n - `vocab_specialization?: 'general' | 'medical'`\n - `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n - `voice_model?: string`\n - `voice_speed?: number`\n - `voice_temperature?: number`\n - `voicemail_detection_timeout_ms?: number`\n - `voicemail_message?: string`\n - `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }`\n - `volume?: number`\n - `webhook_events?: string[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse);\n```",
682
682
  perLanguage: {
683
683
  http: {
684
- example: 'curl https://api.retellai.com/create-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"language\\": \\"en-US\\",\n \\"max_call_duration_ms\\": 3600000,\n \\"normalize_for_speech\\": true,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
684
+ example: 'curl https://api.retellai.com/create-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"language\\": \\"en-US\\",\n \\"max_call_duration_ms\\": 3600000,\n \\"normalize_for_speech\\": true,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
685
685
  },
686
686
  python: {
687
687
  method: 'agent.create',
688
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(agent_response.agent_id)',
688
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(agent_response.agent_id)',
689
689
  },
690
690
  typescript: {
691
691
  method: 'client.agent.create',
692
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse.agent_id);",
692
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse.agent_id);",
693
693
  },
694
694
  },
695
695
  },
@@ -706,15 +706,15 @@ const EMBEDDED_METHODS = [
706
706
  markdown: "## retrieve\n\n`client.agent.retrieve(agent_id: string, version?: number): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: object; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**get** `/get-agent/{agent_id}`\n\nRetrieve details of a specific agent\n\n### Parameters\n\n- `agent_id: string`\n\n- `version?: number`\n Optional version of the API to use for this request. If not provided, will default to latest version.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `version: number`\n - `voice_id: string`\n - `agent_name?: string`\n - `allow_user_dtmf?: boolean`\n - `ambient_sound?: string`\n - `ambient_sound_volume?: number`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `backchannel_frequency?: number`\n - `backchannel_words?: string[]`\n - `begin_message_delay_ms?: number`\n - `boosted_keywords?: string[]`\n - `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n - `enable_backchannel?: boolean`\n - `enable_dynamic_responsiveness?: boolean`\n - `enable_dynamic_voice_speed?: boolean`\n - `end_call_after_silence_ms?: number`\n - `fallback_voice_ids?: string[]`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n - `interruption_sensitivity?: number`\n - `is_public?: boolean`\n - `is_published?: boolean`\n - `ivr_option?: { action: { type: 'hangup'; }; }`\n - `language?: string`\n - `max_call_duration_ms?: number`\n - `normalize_for_speech?: boolean`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_call_analysis_model?: string`\n - `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n - `reminder_max_count?: number`\n - `reminder_trigger_ms?: number`\n - `responsiveness?: number`\n - `ring_duration_ms?: number`\n - `signed_url_expiration_ms?: number`\n - `stt_mode?: 'fast' | 'accurate' | 'custom'`\n - `timezone?: string`\n - `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `version_description?: string`\n - `vocab_specialization?: 'general' | 'medical'`\n - `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n - `voice_model?: string`\n - `voice_speed?: number`\n - `voice_temperature?: number`\n - `voicemail_detection_timeout_ms?: number`\n - `voicemail_message?: string`\n - `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }`\n - `volume?: number`\n - `webhook_events?: string[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponse = await client.agent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponse);\n```",
707
707
  perLanguage: {
708
708
  http: {
709
- example: 'curl https://api.retellai.com/get-agent/$AGENT_ID \\\n -H "Authorization: Bearer $API_KEY"',
709
+ example: 'curl https://api.retellai.com/get-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
710
710
  },
711
711
  python: {
712
712
  method: 'agent.retrieve',
713
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nagent_response = client.agent.retrieve(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(agent_response.agent_id)',
713
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_response = client.agent.retrieve(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(agent_response.agent_id)',
714
714
  },
715
715
  typescript: {
716
716
  method: 'client.agent.retrieve',
717
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst agentResponse = await client.agent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponse.agent_id);",
717
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponse.agent_id);",
718
718
  },
719
719
  },
720
720
  },
@@ -731,15 +731,15 @@ const EMBEDDED_METHODS = [
731
731
  markdown: "## list\n\n`client.agent.list(limit?: number, pagination_key?: string, pagination_key_version?: number): object[]`\n\n**get** `/list-agents`\n\nList all agents\n\n### Parameters\n\n- `limit?: number`\n A limit on the number of objects to be returned. Limit can range between 1 and 1000, and the default is 1000.\n\n- `pagination_key?: string`\n The pagination key to continue fetching the next page of agents. Pagination key is represented by a agent id, pagination key and version pair is exclusive (not included in the fetched page). If not set, will start from the beginning.\n\n- `pagination_key_version?: number`\n Specifies the version of the agent associated with the pagination_key. When paginating, both the pagination_key and its version must be provided to ensure consistent ordering and to fetch the next page correctly.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: { action: object; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: object | object | object | object; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponses = await client.agent.list();\n\nconsole.log(agentResponses);\n```",
732
732
  perLanguage: {
733
733
  http: {
734
- example: 'curl https://api.retellai.com/list-agents \\\n -H "Authorization: Bearer $API_KEY"',
734
+ example: 'curl https://api.retellai.com/list-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
735
735
  },
736
736
  python: {
737
737
  method: 'agent.list',
738
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nagent_responses = client.agent.list()\nprint(agent_responses)',
738
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_responses = client.agent.list()\nprint(agent_responses)',
739
739
  },
740
740
  typescript: {
741
741
  method: 'client.agent.list',
742
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst agentResponses = await client.agent.list();\n\nconsole.log(agentResponses);",
742
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponses = await client.agent.list();\n\nconsole.log(agentResponses);",
743
743
  },
744
744
  },
745
745
  },
@@ -815,15 +815,15 @@ const EMBEDDED_METHODS = [
815
815
  markdown: "## update\n\n`client.agent.update(agent_id: string, version?: number, agent_name?: string, allow_user_dtmf?: boolean, ambient_sound?: string, ambient_sound_volume?: number, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, backchannel_frequency?: number, backchannel_words?: string[], begin_message_delay_ms?: number, boosted_keywords?: string[], custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation', enable_backchannel?: boolean, enable_dynamic_responsiveness?: boolean, enable_dynamic_voice_speed?: boolean, end_call_after_silence_ms?: number, fallback_voice_ids?: string[], guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }, interruption_sensitivity?: number, is_public?: boolean, ivr_option?: { action: { type: 'hangup'; }; }, language?: string, max_call_duration_ms?: number, normalize_for_speech?: boolean, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_call_analysis_model?: string, pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[], reminder_max_count?: number, reminder_trigger_ms?: number, response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, responsiveness?: number, ring_duration_ms?: number, signed_url_expiration_ms?: number, stt_mode?: 'fast' | 'accurate' | 'custom', timezone?: string, user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }, version_description?: string, vocab_specialization?: 'general' | 'medical', voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised', voice_id?: string, voice_model?: string, voice_speed?: number, voice_temperature?: number, voicemail_detection_timeout_ms?: number, voicemail_message?: string, voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }, volume?: number, webhook_events?: string[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: object; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: object; handbook_config?: object; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: object; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: object; post_call_analysis_data?: object | object | object | object | object[]; post_call_analysis_model?: string; pronunciation_dictionary?: object[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: object; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: object; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**patch** `/update-agent/{agent_id}`\n\nUpdate an existing agent's latest draft version\n\n### Parameters\n\n- `agent_id: string`\n\n- `version?: number`\n Optional version of the API to use for this request. Default to latest version.\n\n- `agent_name?: string`\n The name of the agent. Only used for your own reference.\n\n- `allow_user_dtmf?: boolean`\n If set to true, DTMF input will be accepted and processed. If false, any DTMF input will be ignored. Default to true.\n\n- `ambient_sound?: string`\n If set, will add ambient environment sound to the call to make experience more realistic. Currently supports the following options:\n\n- `coffee-shop`: Coffee shop ambience with people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/coffee-shop.wav)\n- `convention-hall`: Convention hall ambience, with some echo and people chatting in background. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/convention-hall.wav)\n- `summer-outdoor`: Summer outdoor ambience with cicada chirping. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/summer-outdoor.wav)\n- `mountain-outdoor`: Mountain outdoor ambience with birds singing. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/mountain-outdoor.wav)\n- `static-noise`: Constant static noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/static-noise.wav)\n- `call-center`: Call center work noise. [Listen to Ambience](https://retell-utils-public.s3.us-west-2.amazonaws.com/call-center.wav)\nSet to `null` to remove ambient sound from this agent.\n\n- `ambient_sound_volume?: number`\n If set, will control the volume of the ambient sound. Value ranging from [0,2]. Lower value means quieter ambient sound, while higher value means louder ambient sound. If unset, default value 1 will apply.\n\n- `analysis_successful_prompt?: string`\n Prompt to determine whether the post call or chat analysis should mark the interaction as successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n Prompt to guide how the post call or chat analysis summary should be generated. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post call or chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `backchannel_frequency?: number`\n Only applicable when enable_backchannel is true. Controls how often the agent would backchannel when a backchannel is possible. Value ranging from [0,1]. Lower value means less frequent backchannel, while higher value means more frequent backchannel. If unset, default value 0.8 will apply.\n\n- `backchannel_words?: string[]`\n Only applicable when enable_backchannel is true. A list of words that the agent would use as backchannel. If not set, default backchannel words will apply. Check out [backchannel default words](/agent/interaction-configuration#backchannel) for more details. Note that certain voices do not work too well with certain words, so it's recommended to experiment before adding any words.\n\n- `begin_message_delay_ms?: number`\n If set, will delay the first message by the specified amount of milliseconds, so that it gives user more time to prepare to take the call. Valid range is [0, 5000]. If not set or set to 0, agent will speak immediately. Only applicable when agent speaks first.\n\n- `boosted_keywords?: string[]`\n Provide a customized list of keywords to bias the transcriber model, so that these words are more likely to get transcribed. Commonly used for names, brands, street, etc.\n\n- `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }`\n Custom STT configuration. Only used when stt_mode is set to custom.\n - `endpointing_ms: number`\n Endpointing timeout in milliseconds. Minimum is 100 for azure, 10 for deepgram.\n - `provider: 'azure' | 'deepgram'`\n The STT provider to use.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Granular setting to manage how Retell stores sensitive data (transcripts, recordings, logs, etc.).\nThis replaces the deprecated `opt_out_sensitive_data_storage` field.\n- `everything`: Store all data including transcripts, recordings, and logs.\n- `everything_except_pii`: Store data without PII when PII is detected.\n- `basic_attributes_only`: Store only basic attributes; no transcripts/recordings/logs.\nIf not set, default value of \"everything\" will apply.\n\n- `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n If set, determines what denoising mode to use. Use \"no-denoise\" to bypass all audio denoising. Default to noise-cancellation.\n\n- `enable_backchannel?: boolean`\n Controls whether the agent would backchannel (agent interjects the speaker with phrases like \"yeah\", \"uh-huh\" to signify interest and engagement). Backchannel when enabled tends to show up more in longer user utterances. If not set, agent will not backchannel.\n\n- `enable_dynamic_responsiveness?: boolean`\n If set to true, the agent will dynamically adjust how quickly it responds based on the user's speech rate and past turn-taking behavior in the call. If unset, default value false will apply.\n\n- `enable_dynamic_voice_speed?: boolean`\n If set to true, will enable dynamic voice speed adjustment based on the user's speech rate and conversation context. If unset, default value false will apply.\n\n- `end_call_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the call. The minimum value allowed is 10,000 ms (10 s). By default, this is set to 600000 (10 min).\n\n- `fallback_voice_ids?: string[]`\n When TTS provider for the selected voice is experiencing outages, we would use fallback voices listed here for the agent. Voice id and the fallback voice ids must be from different TTS providers. The system would go through the list in order, if the first one in the list is also having outage, it would use the next one. Set to null to remove voice fallback for the agent.\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `echo_verification?: boolean`\n Repeat back and confirm important details (voice only).\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `nato_phonetic_alphabet?: boolean`\n Spell using NATO phonetic alphabet style (voice only).\n - `natural_filler_words?: boolean`\n Sprinkle natural speech fillers like \"um\", \"you know\" for a more human, conversational tone.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n - `smart_matching?: boolean`\n Treat near-match similar words as same entity to reduce impact of transcription error (voice only).\n - `speech_normalization?: boolean`\n Convert numbers/dates/currency to spoken forms (voice only).\n\n- `interruption_sensitivity?: number`\n Controls how sensitive the agent is to user interruptions. Value ranging from [0,1]. Lower value means it will take longer / more words for user to interrupt agent, while higher value means it's easier for user to interrupt agent. If unset, default value 1 will apply. When this is set to 0, agent would never be interrupted.\n\n- `is_public?: boolean`\n Whether the agent is public. When set to true, the agent is available for public agent preview link.\n\n- `ivr_option?: { action: { type: 'hangup'; }; }`\n If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection.\n - `action: { type: 'hangup'; }`\n\n- `language?: string`\n Specifies what language (and dialect) the speech recognition will operate in. For instance, selecting `en-GB` optimizes speech recognition for British English. If unset, will use default value `en-US`. Select `multi` for multilingual support.\n\n- `max_call_duration_ms?: number`\n Maximum allowed length for the call, will force end the call if reached. The minimum value allowed is 60,000 ms (1 min), and maximum value allowed is 7,200,000 (2 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `normalize_for_speech?: boolean`\n If set to true, will normalize the some part of text (number, currency, date, etc) to spoken to its spoken form for more consistent speech synthesis (sometimes the voice synthesize system itself might read these wrong with the raw text). For example, it will convert \"Call my number 2137112342 on Jul 5th, 2024 for the $24.12 payment\" to \"Call my number two one three seven one one two three four two on july fifth, twenty twenty four for the twenty four dollars twelve cents payment\" before starting audio generation.\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in for signed URLs for public logs and recordings. When enabled, the generated URLs will include security signatures that restrict access and automatically expire after 24 hours.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post call analysis data to extract from the call. This data will augment the pre-defined variables extracted in the call analysis. This will be available after the call ends.\n\n- `post_call_analysis_model?: string`\n The model to use for post call analysis. Default to gpt-4.1-mini.\n\n- `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n A list of words / phrases and their pronunciation to be used to guide the audio synthesize for consistent pronunciation. Check the dashboard to see what provider supports this feature. Set to null to remove pronunciation dictionary from this agent.\n\n- `reminder_max_count?: number`\n If set, controls how many times agent would remind user when user is unresponsive. Must be a non negative integer. If unset, default value of 1 will apply (remind once). Set to 0 to disable agent from reminding.\n\n- `reminder_trigger_ms?: number`\n If set (in milliseconds), will trigger a reminder to the agent to speak if the user has been silent for the specified duration after some agent speech. Must be a positive number. If unset, default value of 10000 ms (10 s) will apply.\n\n- `response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `responsiveness?: number`\n Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.\n\n- `ring_duration_ms?: number`\n If set, the phone ringing will last for the specified amount of milliseconds. This applies for both outbound call ringtime, and call transfer ringtime. Default to 30000 (30 s). Valid range is [5000, 300000].\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `stt_mode?: 'fast' | 'accurate' | 'custom'`\n If set, determines whether speech to text should focus on latency or accuracy. Default to fast mode. When set to custom, custom_stt_config must be provided.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `digit_limit?: number`\n The maximum number of digits allowed in the user's DTMF (Dual-Tone Multi-Frequency) input per turn. Once this limit is reached, the input is considered complete and a response will be generated immediately.\n - `termination_key?: string`\n A single key that signals the end of DTMF input. Acceptable values include any digit (0-9), the pound/hash symbol (#), or the asterisk (*).\n - `timeout_ms?: number`\n The time (in milliseconds) to wait for user DTMF input before timing out. The timer resets with each digit received.\n\n- `version_description?: string`\n Optional description of the agent version. Used for your own reference and documentation.\n\n- `vocab_specialization?: 'general' | 'medical'`\n If set, determines the vocabulary set to use for transcription. This setting only applies for English agents, for non English agent, this setting is a no-op. Default to general.\n\n- `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n Controls the emotional tone of the agent's voice. Currently supported for Cartesia and Minimax TTS providers. If unset, no emotion will be used.\n\n- `voice_id?: string`\n Unique voice id used for the agent. Find list of available voices and their preview in Dashboard.\n\n- `voice_model?: string`\n Select the voice model used for the selected voice. Each provider has a set of available voice models. Set to null to remove voice model selection, and default ones will apply. Check out dashboard for more details of each voice model.\n\n- `voice_speed?: number`\n Controls speed of voice. Value ranging from [0.5,2]. Lower value means slower speech, while higher value means faster speech rate. If unset, default value 1 will apply.\n\n- `voice_temperature?: number`\n Controls how stable the voice is. Value ranging from [0,2]. Lower value means more stable, and higher value means more variant speech generation. Check the dashboard to see what provider supports this feature. If unset, default value 1 will apply.\n\n- `voicemail_detection_timeout_ms?: number`\n Configures when to stop running voicemail detection, as it becomes unlikely to hit voicemail after a couple minutes, and keep running it will only have negative impact. The minimum value allowed is 5,000 ms (5 s), and maximum value allowed is 180,000 (3 minutes). By default, this is set to 30,000 (30 s).\n\n- `voicemail_message?: string`\n The message to be played when the call enters a voicemail. Note that this feature is only available for phone calls. If you want to hangup after hitting voicemail, set this to empty string.\n\n- `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }`\n If this option is set, the call will try to detect voicemail in the first 3 minutes of the call. Actions defined (hangup, or leave a message) will be applied when the voicemail is detected. Set this to null to disable voicemail detection.\n - `action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }`\n\n- `volume?: number`\n If set, will control the volume of the agent. Value ranging from [0,2]. Lower value means quieter agent speech, while higher value means louder agent speech. If unset, default value 1 will apply.\n\n- `webhook_events?: string[]`\n Which webhook events this agent should receive. If not set, defaults to call_started, call_ended, call_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: { action: { type: 'hangup'; }; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `version: number`\n - `voice_id: string`\n - `agent_name?: string`\n - `allow_user_dtmf?: boolean`\n - `ambient_sound?: string`\n - `ambient_sound_volume?: number`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `backchannel_frequency?: number`\n - `backchannel_words?: string[]`\n - `begin_message_delay_ms?: number`\n - `boosted_keywords?: string[]`\n - `custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'`\n - `enable_backchannel?: boolean`\n - `enable_dynamic_responsiveness?: boolean`\n - `enable_dynamic_voice_speed?: boolean`\n - `end_call_after_silence_ms?: number`\n - `fallback_voice_ids?: string[]`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }`\n - `interruption_sensitivity?: number`\n - `is_public?: boolean`\n - `is_published?: boolean`\n - `ivr_option?: { action: { type: 'hangup'; }; }`\n - `language?: string`\n - `max_call_duration_ms?: number`\n - `normalize_for_speech?: boolean`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_call_analysis_model?: string`\n - `pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]`\n - `reminder_max_count?: number`\n - `reminder_trigger_ms?: number`\n - `responsiveness?: number`\n - `ring_duration_ms?: number`\n - `signed_url_expiration_ms?: number`\n - `stt_mode?: 'fast' | 'accurate' | 'custom'`\n - `timezone?: string`\n - `user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }`\n - `version_description?: string`\n - `vocab_specialization?: 'general' | 'medical'`\n - `voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'`\n - `voice_model?: string`\n - `voice_speed?: number`\n - `voice_temperature?: number`\n - `voicemail_detection_timeout_ms?: number`\n - `voicemail_message?: string`\n - `voicemail_option?: { action: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { type: 'hangup'; } | { type: 'bridge_transfer'; }; }`\n - `volume?: number`\n - `webhook_events?: string[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponse);\n```",
816
816
  perLanguage: {
817
817
  http: {
818
- example: 'curl https://api.retellai.com/update-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"language\\": \\"en-US\\",\n \\"max_call_duration_ms\\": 3600000,\n \\"normalize_for_speech\\": true,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
818
+ example: 'curl https://api.retellai.com/update-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"allow_user_dtmf\\": true,\n \\"ambient_sound_volume\\": 1,\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the outcome of the conversation in two sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"backchannel_frequency\\": 0.9,\n \\"backchannel_words\\": [\n \\"yeah\\",\n \\"uh-huh\\"\n ],\n \\"begin_message_delay_ms\\": 1000,\n \\"boosted_keywords\\": [\n \\"retell\\",\n \\"kroger\\"\n ],\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"denoising_mode\\": \\"noise-cancellation\\",\n \\"enable_backchannel\\": true,\n \\"enable_dynamic_responsiveness\\": true,\n \\"enable_dynamic_voice_speed\\": true,\n \\"end_call_after_silence_ms\\": 600000,\n \\"fallback_voice_ids\\": [\n \\"cartesia-Cimo\\",\n \\"minimax-Cimo\\"\n ],\n \\"interruption_sensitivity\\": 1,\n \\"ivr_option\\": {\n \\"action\\": {\n \\"type\\": \\"hangup\\"\n }\n },\n \\"language\\": \\"en-US\\",\n \\"max_call_duration_ms\\": 3600000,\n \\"normalize_for_speech\\": true,\n \\"opt_in_signed_url\\": true,\n \\"post_call_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"reminder_max_count\\": 2,\n \\"reminder_trigger_ms\\": 10000,\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"responsiveness\\": 1,\n \\"ring_duration_ms\\": 30000,\n \\"signed_url_expiration_ms\\": 86400000,\n \\"stt_mode\\": \\"fast\\",\n \\"timezone\\": \\"America/New_York\\",\n \\"version_description\\": \\"Customer support agent for handling product inquiries\\",\n \\"vocab_specialization\\": \\"general\\",\n \\"voice_emotion\\": \\"calm\\",\n \\"voice_id\\": \\"retell-Cimo\\",\n \\"voice_speed\\": 1,\n \\"voice_temperature\\": 1,\n \\"voicemail_detection_timeout_ms\\": 30000,\n \\"voicemail_message\\": \\"Hi, please give us a callback.\\",\n \\"voicemail_option\\": {\n \\"action\\": {\n \\"text\\": \\"Please give us a callback tomorrow at 10am.\\",\n \\"type\\": \\"static_text\\"\n }\n },\n \\"volume\\": 1,\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
819
819
  },
820
820
  python: {
821
821
  method: 'agent.update',
822
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nagent_response = client.agent.update(\n agent_id="16b980523634a6dc504898cda492e939",\n agent_name="Jarvis",\n)\nprint(agent_response.agent_id)',
822
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_response = client.agent.update(\n agent_id="16b980523634a6dc504898cda492e939",\n agent_name="Jarvis",\n)\nprint(agent_response.agent_id)',
823
823
  },
824
824
  typescript: {
825
825
  method: 'client.agent.update',
826
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {\n agent_name: 'Jarvis',\n});\n\nconsole.log(agentResponse.agent_id);",
826
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {\n agent_name: 'Jarvis',\n});\n\nconsole.log(agentResponse.agent_id);",
827
827
  },
828
828
  },
829
829
  },
@@ -839,15 +839,15 @@ const EMBEDDED_METHODS = [
839
839
  markdown: "## delete\n\n`client.agent.delete(agent_id: string): void`\n\n**delete** `/delete-agent/{agent_id}`\n\nDelete an existing agent\n\n### Parameters\n\n- `agent_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.agent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD')\n```",
840
840
  perLanguage: {
841
841
  http: {
842
- example: 'curl https://api.retellai.com/delete-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
842
+ example: 'curl https://api.retellai.com/delete-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
843
843
  },
844
844
  python: {
845
845
  method: 'agent.delete',
846
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.agent.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
846
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.agent.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
847
847
  },
848
848
  typescript: {
849
849
  method: 'client.agent.delete',
850
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.agent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
850
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.agent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
851
851
  },
852
852
  },
853
853
  },
@@ -863,15 +863,15 @@ const EMBEDDED_METHODS = [
863
863
  markdown: "## publish\n\n`client.agent.publish(agent_id: string): void`\n\n**post** `/publish-agent/{agent_id}`\n\nPublish the latest version of the agent and create a new draft agent with newer version.\n\n### Parameters\n\n- `agent_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.agent.publish('16b980523634a6dc504898cda492e939')\n```",
864
864
  perLanguage: {
865
865
  http: {
866
- example: 'curl https://api.retellai.com/publish-agent/$AGENT_ID \\\n -X POST \\\n -H "Authorization: Bearer $API_KEY"',
866
+ example: 'curl https://api.retellai.com/publish-agent/$AGENT_ID \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
867
867
  },
868
868
  python: {
869
869
  method: 'agent.publish',
870
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.agent.publish(\n "16b980523634a6dc504898cda492e939",\n)',
870
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.agent.publish(\n "16b980523634a6dc504898cda492e939",\n)',
871
871
  },
872
872
  typescript: {
873
873
  method: 'client.agent.publish',
874
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.agent.publish('16b980523634a6dc504898cda492e939');",
874
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.agent.publish('16b980523634a6dc504898cda492e939');",
875
875
  },
876
876
  },
877
877
  },
@@ -888,15 +888,15 @@ const EMBEDDED_METHODS = [
888
888
  markdown: "## get-versions\n\n`client.agent.getVersions(agent_id: string): object[]`\n\n**get** `/get-agent-versions/{agent_id}`\n\nGet all versions of an agent\n\n### Parameters\n\n- `agent_id: string`\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; version: number; voice_id: string; agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; is_published?: boolean; ivr_option?: { action: object; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: object | object | object | object; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponses);\n```",
889
889
  perLanguage: {
890
890
  http: {
891
- example: 'curl https://api.retellai.com/get-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $API_KEY"',
891
+ example: 'curl https://api.retellai.com/get-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
892
892
  },
893
893
  python: {
894
894
  method: 'agent.get_versions',
895
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nagent_responses = client.agent.get_versions(\n "16b980523634a6dc504898cda492e939",\n)\nprint(agent_responses)',
895
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nagent_responses = client.agent.get_versions(\n "16b980523634a6dc504898cda492e939",\n)\nprint(agent_responses)',
896
896
  },
897
897
  typescript: {
898
898
  method: 'client.agent.getVersions',
899
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponses);",
899
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(agentResponses);",
900
900
  },
901
901
  },
902
902
  },
@@ -936,15 +936,15 @@ const EMBEDDED_METHODS = [
936
936
  markdown: "## create\n\n`client.chatAgent.create(response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, agent_name?: string, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, auto_close_message?: string, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', end_chat_after_silence_ms?: number, guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }, is_public?: boolean, language?: string, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_chat_analysis_model?: string, signed_url_expiration_ms?: number, timezone?: string, webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: object; handbook_config?: object; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: object; post_chat_analysis_data?: object | object | object | object | object[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**post** `/create-chat-agent`\n\nCreate a new chat agent\n\n### Parameters\n\n- `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `agent_name?: string`\n The name of the chat agent. Only used for your own reference.\n\n- `analysis_successful_prompt?: string`\n The prompt to use for post call analysis to evaluate whether the call is successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n The prompt to use for post call analysis to summarize the call. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `auto_close_message?: string`\n Message to display when the chat is automatically closed.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Controls what data is stored for this agent. \"everything\" stores all data including transcripts and recordings. \"everything_except_pii\" stores data but excludes PII when possible based on PII configuration. \"basic_attributes_only\" stores only basic metadata. If not set, defaults to \"everything\".\n\n- `end_chat_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the chat. The minimum value allowed is 120,000 ms (2 minutes). The maximum value allowed is 259,200,000 ms (72 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n\n- `is_public?: boolean`\n Whether the agent is public. When set to true, the agent is available for public agent preview link.\n\n- `language?: string`\n Specifies what language (and dialect) the chat will operate in. For instance, selecting `en-GB` optimizes for British English. If unset, will use default value `en-US`. Select `multi` for multilingual support, currently this supports Spanish and English.\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in to signed url for public log. If not set, default value of false will apply.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post chat analysis data to extract from the chat. This data will augment the pre-defined variables extracted in the chat analysis. This will be available after the chat ends.\n\n- `post_chat_analysis_model?: string`\n The model to use for post chat analysis. Default to gpt-4.1-mini.\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]`\n Which webhook events this agent should receive. If not set, defaults to chat_started, chat_ended, chat_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to chat events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `agent_name?: string`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `auto_close_message?: string`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `end_chat_after_silence_ms?: number`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }`\n - `is_public?: boolean`\n - `is_published?: boolean`\n - `language?: string`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_chat_analysis_model?: string`\n - `signed_url_expiration_ms?: number`\n - `timezone?: string`\n - `version?: number`\n - `webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatAgentResponse = await client.chatAgent.create({ response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' } });\n\nconsole.log(chatAgentResponse);\n```",
937
937
  perLanguage: {
938
938
  http: {
939
- example: 'curl https://api.retellai.com/create-chat-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"language\\": \\"en-US\\",\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
939
+ example: 'curl https://api.retellai.com/create-chat-agent \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"language\\": \\"en-US\\",\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
940
940
  },
941
941
  python: {
942
942
  method: 'chat_agent.create',
943
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_agent_response = client.chat_agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n)\nprint(chat_agent_response.agent_id)',
943
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_response = client.chat_agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n)\nprint(chat_agent_response.agent_id)',
944
944
  },
945
945
  typescript: {
946
946
  method: 'client.chatAgent.create',
947
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatAgentResponse = await client.chatAgent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n});\n\nconsole.log(chatAgentResponse.agent_id);",
947
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponse = await client.chatAgent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n});\n\nconsole.log(chatAgentResponse.agent_id);",
948
948
  },
949
949
  },
950
950
  },
@@ -961,15 +961,15 @@ const EMBEDDED_METHODS = [
961
961
  markdown: "## retrieve\n\n`client.chatAgent.retrieve(agent_id: string, version?: number): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: object; handbook_config?: object; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: object; post_chat_analysis_data?: object | object | object | object | object[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**get** `/get-chat-agent/{agent_id}`\n\nRetrieve details of a specific chat agent\n\n### Parameters\n\n- `agent_id: string`\n\n- `version?: number`\n Optional version of the API to use for this request. If not provided, will default to latest version.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `agent_name?: string`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `auto_close_message?: string`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `end_chat_after_silence_ms?: number`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }`\n - `is_public?: boolean`\n - `is_published?: boolean`\n - `language?: string`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_chat_analysis_model?: string`\n - `signed_url_expiration_ms?: number`\n - `timezone?: string`\n - `version?: number`\n - `webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatAgentResponse = await client.chatAgent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse);\n```",
962
962
  perLanguage: {
963
963
  http: {
964
- example: 'curl https://api.retellai.com/get-chat-agent/$AGENT_ID \\\n -H "Authorization: Bearer $API_KEY"',
964
+ example: 'curl https://api.retellai.com/get-chat-agent/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
965
965
  },
966
966
  python: {
967
967
  method: 'chat_agent.retrieve',
968
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_agent_response = client.chat_agent.retrieve(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_response.agent_id)',
968
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_response = client.chat_agent.retrieve(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_response.agent_id)',
969
969
  },
970
970
  typescript: {
971
971
  method: 'client.chatAgent.retrieve',
972
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatAgentResponse = await client.chatAgent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse.agent_id);",
972
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponse = await client.chatAgent.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse.agent_id);",
973
973
  },
974
974
  },
975
975
  },
@@ -986,15 +986,15 @@ const EMBEDDED_METHODS = [
986
986
  markdown: "## list\n\n`client.chatAgent.list(limit?: number, pagination_key?: string, pagination_key_version?: number): object[]`\n\n**get** `/list-chat-agents`\n\nList all chat agents\n\n### Parameters\n\n- `limit?: number`\n A limit on the number of objects to be returned. Limit can range between 1 and 1000, and the default is 1000.\n\n- `pagination_key?: string`\n The pagination key to continue fetching the next page of agents. Pagination key is represented by a agent id, pagination key and version pair is exclusive (not included in the fetched page). If not set, will start from the beginning.\n\n- `pagination_key_version?: number`\n Specifies the version of the agent associated with the pagination_key. When paginating, both the pagination_key and its version must be provided to ensure consistent ordering and to fetch the next page correctly.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatAgentResponses = await client.chatAgent.list();\n\nconsole.log(chatAgentResponses);\n```",
987
987
  perLanguage: {
988
988
  http: {
989
- example: 'curl https://api.retellai.com/list-chat-agents \\\n -H "Authorization: Bearer $API_KEY"',
989
+ example: 'curl https://api.retellai.com/list-chat-agents \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
990
990
  },
991
991
  python: {
992
992
  method: 'chat_agent.list',
993
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_agent_responses = client.chat_agent.list()\nprint(chat_agent_responses)',
993
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_responses = client.chat_agent.list()\nprint(chat_agent_responses)',
994
994
  },
995
995
  typescript: {
996
996
  method: 'client.chatAgent.list',
997
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatAgentResponses = await client.chatAgent.list();\n\nconsole.log(chatAgentResponses);",
997
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponses = await client.chatAgent.list();\n\nconsole.log(chatAgentResponses);",
998
998
  },
999
999
  },
1000
1000
  },
@@ -1036,15 +1036,15 @@ const EMBEDDED_METHODS = [
1036
1036
  markdown: "## update\n\n`client.chatAgent.update(agent_id: string, version?: number, agent_name?: string, analysis_successful_prompt?: string, analysis_summary_prompt?: string, analysis_user_sentiment_prompt?: string, auto_close_message?: string, data_storage_retention_days?: number, data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only', end_chat_after_silence_ms?: number, guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }, handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }, is_public?: boolean, language?: string, opt_in_signed_url?: boolean, pii_config?: { categories: string[]; mode: 'post_call'; }, post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[], post_chat_analysis_model?: string, response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, signed_url_expiration_ms?: number, timezone?: string, webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[], webhook_timeout_ms?: number, webhook_url?: string): { agent_id: string; last_modification_timestamp: number; response_engine: object | object | object; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: object; handbook_config?: object; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: object; post_chat_analysis_data?: object | object | object | object | object[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n**patch** `/update-chat-agent/{agent_id}`\n\nUpdate an existing chat agent\n\n### Parameters\n\n- `agent_id: string`\n\n- `version?: number`\n Optional version of the API to use for this request. Default to latest version.\n\n- `agent_name?: string`\n The name of the chat agent. Only used for your own reference.\n\n- `analysis_successful_prompt?: string`\n The prompt to use for post call analysis to evaluate whether the call is successful. Set to null to use the default prompt.\n\n- `analysis_summary_prompt?: string`\n The prompt to use for post call analysis to summarize the call. Set to null to use the default prompt.\n\n- `analysis_user_sentiment_prompt?: string`\n Prompt to guide how the post chat analysis should evaluate user sentiment. When unset, the default system prompt is used. Set to null to use the default prompt.\n\n- `auto_close_message?: string`\n Message to display when the chat is automatically closed.\n\n- `data_storage_retention_days?: number`\n Number of days to retain call/chat data before automatic deletion. Must be between 1 and 730 days. If not set, data is retained forever (no automatic deletion).\n\n- `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n Controls what data is stored for this agent. \"everything\" stores all data including transcripts and recordings. \"everything_except_pii\" stores data but excludes PII when possible based on PII configuration. \"basic_attributes_only\" stores only basic metadata. If not set, defaults to \"everything\".\n\n- `end_chat_after_silence_ms?: number`\n If users stay silent for a period after agent speech, end the chat. The minimum value allowed is 120,000 ms (2 minutes). The maximum value allowed is 259,200,000 ms (72 hours). By default, this is set to 3,600,000 (1 hour).\n\n- `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n Configuration for guardrail checks to detect and prevent prohibited topics in agent output and user input.\n - `input_topics?: 'platform_integrity_jailbreaking'[]`\n Selected prohibited user topic categories to check. When user messages contain these topics, the agent will respond with a placeholder message instead of processing the request.\n - `output_topics?: string[]`\n Selected prohibited agent topic categories to check. When agent messages contain these topics, they will be replaced with a placeholder message.\n\n- `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }`\n Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents.\n - `ai_disclosure?: boolean`\n When asked, acknowledge being a virtual assistant.\n - `default_personality?: boolean`\n Professional call center rep baseline.\n - `high_empathy?: boolean`\n Warm acknowledgment of caller concerns.\n - `scope_boundaries?: boolean`\n Stay within prompt/context scope, don't invent details.\n\n- `is_public?: boolean`\n Whether the agent is public. When set to true, the agent is available for public agent preview link.\n\n- `language?: string`\n Specifies what language (and dialect) the chat will operate in. For instance, selecting `en-GB` optimizes for British English. If unset, will use default value `en-US`. Select `multi` for multilingual support, currently this supports Spanish and English.\n\n- `opt_in_signed_url?: boolean`\n Whether this agent opts in to signed url for public log. If not set, default value of false will apply.\n\n- `pii_config?: { categories: string[]; mode: 'post_call'; }`\n Configuration for PII scrubbing from transcripts and recordings.\n - `categories: string[]`\n List of PII categories to scrub from transcripts and recordings.\n - `mode: 'post_call'`\n The processing mode for PII scrubbing. Currently only post-call is supported.\n\n- `post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n Post chat analysis data to extract from the chat. This data will augment the pre-defined variables extracted in the chat analysis. This will be available after the chat ends.\n\n- `post_chat_analysis_model?: string`\n The model to use for post chat analysis. Default to gpt-4.1-mini.\n\n- `response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n The Response Engine to attach to the agent. It is used to generate responses for the agent. You need to create a Response Engine first before attaching it to an agent.\n\n- `signed_url_expiration_ms?: number`\n The expiration time for the signed url in milliseconds. Only applicable when opt_in_signed_url is true. If not set, default value of 86400000 (24 hours) will apply.\n\n- `timezone?: string`\n IANA timezone for the agent (e.g. America/New_York). Defaults to America/Los_Angeles if not set.\n\n- `webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]`\n Which webhook events this agent should receive. If not set, defaults to chat_started, chat_ended, chat_analyzed.\n\n- `webhook_timeout_ms?: number`\n The timeout for the webhook in milliseconds. If not set, default value of 10000 will apply.\n\n- `webhook_url?: string`\n The webhook for agent to listen to chat events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }`\n\n - `agent_id: string`\n - `last_modification_timestamp: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `agent_name?: string`\n - `analysis_successful_prompt?: string`\n - `analysis_summary_prompt?: string`\n - `analysis_user_sentiment_prompt?: string`\n - `auto_close_message?: string`\n - `data_storage_retention_days?: number`\n - `data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'`\n - `end_chat_after_silence_ms?: number`\n - `guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }`\n - `handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }`\n - `is_public?: boolean`\n - `is_published?: boolean`\n - `language?: string`\n - `opt_in_signed_url?: boolean`\n - `pii_config?: { categories: string[]; mode: 'post_call'; }`\n - `post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]`\n - `post_chat_analysis_model?: string`\n - `signed_url_expiration_ms?: number`\n - `timezone?: string`\n - `version?: number`\n - `webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]`\n - `webhook_timeout_ms?: number`\n - `webhook_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatAgentResponse = await client.chatAgent.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse);\n```",
1037
1037
  perLanguage: {
1038
1038
  http: {
1039
- example: 'curl https://api.retellai.com/update-chat-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"language\\": \\"en-US\\",\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
1039
+ example: 'curl https://api.retellai.com/update-chat-agent/$AGENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d "{\n \\"agent_name\\": \\"Jarvis\\",\n \\"analysis_successful_prompt\\": \\"The agent finished the task and the call was complete without being cutoff.\\",\n \\"analysis_summary_prompt\\": \\"Summarize the call in a few sentences.\\",\n \\"analysis_user_sentiment_prompt\\": \\"Evaluate the user\'s sentiment based on their tone and satisfaction level.\\",\n \\"auto_close_message\\": \\"Thank you for chatting. The conversation has ended.\\",\n \\"data_storage_retention_days\\": 30,\n \\"data_storage_setting\\": \\"everything\\",\n \\"end_chat_after_silence_ms\\": 3600000,\n \\"language\\": \\"en-US\\",\n \\"opt_in_signed_url\\": true,\n \\"post_chat_analysis_model\\": \\"gpt-4.1-mini\\",\n \\"response_engine\\": {\n \\"llm_id\\": \\"llm_234sdertfsdsfsdf\\",\n \\"type\\": \\"retell-llm\\",\n \\"version\\": 0\n },\n \\"signed_url_expiration_ms\\": 86400000,\n \\"timezone\\": \\"America/New_York\\",\n \\"webhook_timeout_ms\\": 10000,\n \\"webhook_url\\": \\"https://webhook-url-here\\"\n }"',
1040
1040
  },
1041
1041
  python: {
1042
1042
  method: 'chat_agent.update',
1043
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_agent_response = client.chat_agent.update(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_response.agent_id)',
1043
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_response = client.chat_agent.update(\n agent_id="16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_response.agent_id)',
1044
1044
  },
1045
1045
  typescript: {
1046
1046
  method: 'client.chatAgent.update',
1047
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatAgentResponse = await client.chatAgent.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse.agent_id);",
1047
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponse = await client.chatAgent.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponse.agent_id);",
1048
1048
  },
1049
1049
  },
1050
1050
  },
@@ -1060,15 +1060,15 @@ const EMBEDDED_METHODS = [
1060
1060
  markdown: "## delete\n\n`client.chatAgent.delete(agent_id: string): void`\n\n**delete** `/delete-chat-agent/{agent_id}`\n\nDelete an existing chat agent\n\n### Parameters\n\n- `agent_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.chatAgent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD')\n```",
1061
1061
  perLanguage: {
1062
1062
  http: {
1063
- example: 'curl https://api.retellai.com/delete-chat-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
1063
+ example: 'curl https://api.retellai.com/delete-chat-agent/$AGENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1064
1064
  },
1065
1065
  python: {
1066
1066
  method: 'chat_agent.delete',
1067
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.chat_agent.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
1067
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat_agent.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
1068
1068
  },
1069
1069
  typescript: {
1070
1070
  method: 'client.chatAgent.delete',
1071
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.chatAgent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
1071
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chatAgent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
1072
1072
  },
1073
1073
  },
1074
1074
  },
@@ -1084,15 +1084,15 @@ const EMBEDDED_METHODS = [
1084
1084
  markdown: "## publish\n\n`client.chatAgent.publish(agent_id: string): void`\n\n**post** `/publish-chat-agent/{agent_id}`\n\nPublish the latest version of the chat agent and create a new draft chat agent with newer version.\n\n### Parameters\n\n- `agent_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.chatAgent.publish('16b980523634a6dc504898cda492e939')\n```",
1085
1085
  perLanguage: {
1086
1086
  http: {
1087
- example: 'curl https://api.retellai.com/publish-chat-agent/$AGENT_ID \\\n -X POST \\\n -H "Authorization: Bearer $API_KEY"',
1087
+ example: 'curl https://api.retellai.com/publish-chat-agent/$AGENT_ID \\\n -X POST \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1088
1088
  },
1089
1089
  python: {
1090
1090
  method: 'chat_agent.publish',
1091
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.chat_agent.publish(\n "16b980523634a6dc504898cda492e939",\n)',
1091
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.chat_agent.publish(\n "16b980523634a6dc504898cda492e939",\n)',
1092
1092
  },
1093
1093
  typescript: {
1094
1094
  method: 'client.chatAgent.publish',
1095
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.chatAgent.publish('16b980523634a6dc504898cda492e939');",
1095
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chatAgent.publish('16b980523634a6dc504898cda492e939');",
1096
1096
  },
1097
1097
  },
1098
1098
  },
@@ -1109,15 +1109,15 @@ const EMBEDDED_METHODS = [
1109
1109
  markdown: "## get-versions\n\n`client.chatAgent.getVersions(agent_id: string): object[]`\n\n**get** `/get-chat-agent-versions/{agent_id}`\n\nGet all versions of a chat agent\n\n### Parameters\n\n- `agent_id: string`\n\n### Returns\n\n- `{ agent_id: string; last_modification_timestamp: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; agent_name?: string; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; auto_close_message?: string; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; end_chat_after_silence_ms?: number; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; high_empathy?: boolean; scope_boundaries?: boolean; }; is_public?: boolean; is_published?: boolean; language?: string; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_chat_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'chat_summary' | 'chat_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_chat_analysis_model?: string; signed_url_expiration_ms?: number; timezone?: string; version?: number; webhook_events?: 'chat_started' | 'chat_ended' | 'chat_analyzed'[]; webhook_timeout_ms?: number; webhook_url?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst chatAgentResponses = await client.chatAgent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponses);\n```",
1110
1110
  perLanguage: {
1111
1111
  http: {
1112
- example: 'curl https://api.retellai.com/get-chat-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $API_KEY"',
1112
+ example: 'curl https://api.retellai.com/get-chat-agent-versions/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1113
1113
  },
1114
1114
  python: {
1115
1115
  method: 'chat_agent.get_versions',
1116
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nchat_agent_responses = client.chat_agent.get_versions(\n "16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_responses)',
1116
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nchat_agent_responses = client.chat_agent.get_versions(\n "16b980523634a6dc504898cda492e939",\n)\nprint(chat_agent_responses)',
1117
1117
  },
1118
1118
  typescript: {
1119
1119
  method: 'client.chatAgent.getVersions',
1120
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst chatAgentResponses = await client.chatAgent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponses);",
1120
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatAgentResponses = await client.chatAgent.getVersions('16b980523634a6dc504898cda492e939');\n\nconsole.log(chatAgentResponses);",
1121
1121
  },
1122
1122
  },
1123
1123
  },
@@ -1152,15 +1152,15 @@ const EMBEDDED_METHODS = [
1152
1152
  markdown: "## create\n\n`client.llm.create(begin_after_user_silence_ms?: number, begin_message?: string, default_dynamic_variables?: object, general_prompt?: string, general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[], kb_config?: { filter_score?: number; top_k?: number; }, knowledge_base_ids?: string[], mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[], model?: string, model_high_priority?: boolean, model_temperature?: number, s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini', start_speaker?: 'user' | 'agent', starting_state?: string, states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: object; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[], tool_call_strict_mode?: boolean, version?: number): { last_modification_timestamp: number; llm_id: string; begin_after_user_silence_ms?: number; begin_message?: string; default_dynamic_variables?: object; general_prompt?: string; general_tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; is_published?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; starting_state?: string; states?: object[]; tool_call_strict_mode?: boolean; version?: number; }`\n\n**post** `/create-retell-llm`\n\nCreate a new Retell LLM Response Engine that can be attached to an agent. This is used to generate response output for the agent.\n\n### Parameters\n\n- `begin_after_user_silence_ms?: number`\n If set, the AI will begin the conversation after waiting for the user for the duration (in milliseconds) specified by this attribute. This only applies if the agent is configured to wait for the user to speak first. If not set, the agent will wait indefinitely for the user to speak.\n\n- `begin_message?: string`\n First utterance said by the agent in the call. If not set, LLM will dynamically generate a message. If set to \"\", agent will wait for user to speak first.\n\n- `default_dynamic_variables?: object`\n Default dynamic variables represented as key-value pairs of strings. These are injected into your Retell LLM prompt and tool description when specific values are not provided in a request. Only applicable for Retell LLM.\n\n- `general_prompt?: string`\n General prompt appended to system prompt no matter what state the agent is in.\n\n- System prompt (with state) = general prompt + state prompt.\n- System prompt (no state) = general prompt.\n\n\n- `general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]`\n A list of tools the model may call (to get external knowledge, call API, etc). You can select from some common predefined tools like end call, transfer call, etc; or you can create your own custom tool for the LLM to use.\n\n- Tools of LLM (with state) = general tools + state tools + state transitions\n- Tools of LLM (no state) = general tools\n\n\n- `kb_config?: { filter_score?: number; top_k?: number; }`\n Knowledge base configuration for RAG retrieval.\n - `filter_score?: number`\n Similarity threshold for filtering search results\n - `top_k?: number`\n Max number of knowledge base chunks to retrieve\n\n- `knowledge_base_ids?: string[]`\n A list of knowledge base ids to use for this resource.\n\n- `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n A list of MCPs to use for this LLM.\n\n- `model?: string`\n Select the underlying text LLM. If not set, would default to gpt-4.1.\n\n- `model_high_priority?: boolean`\n If set to true, will use high priority pool with more dedicated resource to ensure lower and more consistent latency, default to false. This feature usually comes with a higher cost.\n\n- `model_temperature?: number`\n If set, will control the randomness of the response. Value ranging from [0,1]. Lower value means more deterministic, while higher value means more random. If unset, default value 0 will apply. Note that for tool calling, a lower value is recommended.\n\n- `s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'`\n Select the underlying speech to speech model. Can only set this or model, not both.\n\n- `start_speaker?: 'user' | 'agent'`\n The speaker who starts the conversation. Required. Must be either 'user' or 'agent'.\n\n- `starting_state?: string`\n Name of the starting state. Required if states is not empty.\n\n- `states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: { properties: object; type: 'object'; required?: string[]; }; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]`\n States of the LLM. This is to help reduce prompt length and tool choices when the call can be broken into distinct states. With shorter prompts and less tools, the LLM can better focus and follow the rules, minimizing hallucination. If this field is not set, the agent would only have general prompt and general tools (essentially one state).\n\n- `tool_call_strict_mode?: boolean`\n Whether to use strict mode for tool calls. Only applicable when using certain supported models.\n\n- `version?: number`\n The version of the LLM.\n\n### Returns\n\n- `{ last_modification_timestamp: number; llm_id: string; begin_after_user_silence_ms?: number; begin_message?: string; default_dynamic_variables?: object; general_prompt?: string; general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; is_published?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; starting_state?: string; states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: object; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]; tool_call_strict_mode?: boolean; version?: number; }`\n\n - `last_modification_timestamp: number`\n - `llm_id: string`\n - `begin_after_user_silence_ms?: number`\n - `begin_message?: string`\n - `default_dynamic_variables?: object`\n - `general_prompt?: string`\n - `general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]`\n - `is_published?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model?: string`\n - `model_high_priority?: boolean`\n - `model_temperature?: number`\n - `s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'`\n - `start_speaker?: 'user' | 'agent'`\n - `starting_state?: string`\n - `states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: { properties: object; type: 'object'; required?: string[]; }; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]`\n - `tool_call_strict_mode?: boolean`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst llmResponse = await client.llm.create();\n\nconsole.log(llmResponse);\n```",
1153
1153
  perLanguage: {
1154
1154
  http: {
1155
- example: 'curl https://api.retellai.com/create-retell-llm \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true,\n "version": 1\n }\'',
1155
+ example: 'curl https://api.retellai.com/create-retell-llm \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true,\n "version": 1\n }\'',
1156
1156
  },
1157
1157
  python: {
1158
1158
  method: 'llm.create',
1159
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nllm_response = client.llm.create()\nprint(llm_response.llm_id)',
1159
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllm_response = client.llm.create()\nprint(llm_response.llm_id)',
1160
1160
  },
1161
1161
  typescript: {
1162
1162
  method: 'client.llm.create',
1163
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst llmResponse = await client.llm.create();\n\nconsole.log(llmResponse.llm_id);",
1163
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llmResponse = await client.llm.create();\n\nconsole.log(llmResponse.llm_id);",
1164
1164
  },
1165
1165
  },
1166
1166
  },
@@ -1177,15 +1177,15 @@ const EMBEDDED_METHODS = [
1177
1177
  markdown: "## retrieve\n\n`client.llm.retrieve(llm_id: string, version?: number): { last_modification_timestamp: number; llm_id: string; begin_after_user_silence_ms?: number; begin_message?: string; default_dynamic_variables?: object; general_prompt?: string; general_tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; is_published?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; starting_state?: string; states?: object[]; tool_call_strict_mode?: boolean; version?: number; }`\n\n**get** `/get-retell-llm/{llm_id}`\n\nRetrieve details of a specific Retell LLM Response Engine\n\n### Parameters\n\n- `llm_id: string`\n\n- `version?: number`\n Optional version of the API to use for this request. Default to latest version.\n\n### Returns\n\n- `{ last_modification_timestamp: number; llm_id: string; begin_after_user_silence_ms?: number; begin_message?: string; default_dynamic_variables?: object; general_prompt?: string; general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; is_published?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; starting_state?: string; states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: object; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]; tool_call_strict_mode?: boolean; version?: number; }`\n\n - `last_modification_timestamp: number`\n - `llm_id: string`\n - `begin_after_user_silence_ms?: number`\n - `begin_message?: string`\n - `default_dynamic_variables?: object`\n - `general_prompt?: string`\n - `general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]`\n - `is_published?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model?: string`\n - `model_high_priority?: boolean`\n - `model_temperature?: number`\n - `s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'`\n - `start_speaker?: 'user' | 'agent'`\n - `starting_state?: string`\n - `states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: { properties: object; type: 'object'; required?: string[]; }; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]`\n - `tool_call_strict_mode?: boolean`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst llmResponse = await client.llm.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(llmResponse);\n```",
1178
1178
  perLanguage: {
1179
1179
  http: {
1180
- example: 'curl https://api.retellai.com/get-retell-llm/$LLM_ID \\\n -H "Authorization: Bearer $API_KEY"',
1180
+ example: 'curl https://api.retellai.com/get-retell-llm/$LLM_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1181
1181
  },
1182
1182
  python: {
1183
1183
  method: 'llm.retrieve',
1184
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nllm_response = client.llm.retrieve(\n llm_id="16b980523634a6dc504898cda492e939",\n)\nprint(llm_response.llm_id)',
1184
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllm_response = client.llm.retrieve(\n llm_id="16b980523634a6dc504898cda492e939",\n)\nprint(llm_response.llm_id)',
1185
1185
  },
1186
1186
  typescript: {
1187
1187
  method: 'client.llm.retrieve',
1188
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst llmResponse = await client.llm.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(llmResponse.llm_id);",
1188
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llmResponse = await client.llm.retrieve('16b980523634a6dc504898cda492e939');\n\nconsole.log(llmResponse.llm_id);",
1189
1189
  },
1190
1190
  },
1191
1191
  },
@@ -1202,15 +1202,15 @@ const EMBEDDED_METHODS = [
1202
1202
  markdown: "## list\n\n`client.llm.list(limit?: number, pagination_key?: string, pagination_key_version?: number): object[]`\n\n**get** `/list-retell-llms`\n\nList all Retell LLM Response Engines that can be attached to an agent.\n\n### Parameters\n\n- `limit?: number`\n A limit on the number of objects to be returned. Limit can range between 1 and 1000, and the default is 1000.\n\n- `pagination_key?: string`\n The pagination key to continue fetching the next page of LLMs. Pagination key is represented by a llm id, pagination key and version pair is exclusive (not included in the fetched page). If not set, will start from the beginning.\n\n- `pagination_key_version?: number`\n Specifies the version of the llm associated with the pagination_key. When paginating, both the pagination_key and its version must be provided to ensure consistent ordering and to fetch the next page correctly.\n\n### Returns\n\n- `{ last_modification_timestamp: number; llm_id: string; begin_after_user_silence_ms?: number; begin_message?: string; default_dynamic_variables?: object; general_prompt?: string; general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; is_published?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; starting_state?: string; states?: { name: string; edges?: object[]; state_prompt?: string; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; }[]; tool_call_strict_mode?: boolean; version?: number; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst llmResponses = await client.llm.list();\n\nconsole.log(llmResponses);\n```",
1203
1203
  perLanguage: {
1204
1204
  http: {
1205
- example: 'curl https://api.retellai.com/list-retell-llms \\\n -H "Authorization: Bearer $API_KEY"',
1205
+ example: 'curl https://api.retellai.com/list-retell-llms \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1206
1206
  },
1207
1207
  python: {
1208
1208
  method: 'llm.list',
1209
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nllm_responses = client.llm.list()\nprint(llm_responses)',
1209
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllm_responses = client.llm.list()\nprint(llm_responses)',
1210
1210
  },
1211
1211
  typescript: {
1212
1212
  method: 'client.llm.list',
1213
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst llmResponses = await client.llm.list();\n\nconsole.log(llmResponses);",
1213
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llmResponses = await client.llm.list();\n\nconsole.log(llmResponses);",
1214
1214
  },
1215
1215
  },
1216
1216
  },
@@ -1247,15 +1247,15 @@ const EMBEDDED_METHODS = [
1247
1247
  markdown: "## update\n\n`client.llm.update(llm_id: string, version?: number, begin_after_user_silence_ms?: number, begin_message?: string, default_dynamic_variables?: object, general_prompt?: string, general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[], kb_config?: { filter_score?: number; top_k?: number; }, knowledge_base_ids?: string[], mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[], model?: string, model_high_priority?: boolean, model_temperature?: number, s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini', start_speaker?: 'user' | 'agent', starting_state?: string, states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: object; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[], tool_call_strict_mode?: boolean, version?: number): { last_modification_timestamp: number; llm_id: string; begin_after_user_silence_ms?: number; begin_message?: string; default_dynamic_variables?: object; general_prompt?: string; general_tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; is_published?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; starting_state?: string; states?: object[]; tool_call_strict_mode?: boolean; version?: number; }`\n\n**patch** `/update-retell-llm/{llm_id}`\n\nUpdate an existing Retell LLM Response Engine\n\n### Parameters\n\n- `llm_id: string`\n\n- `version?: number`\n Optional version of the API to use for this request. Default to latest version.\n\n- `begin_after_user_silence_ms?: number`\n If set, the AI will begin the conversation after waiting for the user for the duration (in milliseconds) specified by this attribute. This only applies if the agent is configured to wait for the user to speak first. If not set, the agent will wait indefinitely for the user to speak.\n\n- `begin_message?: string`\n First utterance said by the agent in the call. If not set, LLM will dynamically generate a message. If set to \"\", agent will wait for user to speak first.\n\n- `default_dynamic_variables?: object`\n Default dynamic variables represented as key-value pairs of strings. These are injected into your Retell LLM prompt and tool description when specific values are not provided in a request. Only applicable for Retell LLM.\n\n- `general_prompt?: string`\n General prompt appended to system prompt no matter what state the agent is in.\n\n- System prompt (with state) = general prompt + state prompt.\n- System prompt (no state) = general prompt.\n\n\n- `general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]`\n A list of tools the model may call (to get external knowledge, call API, etc). You can select from some common predefined tools like end call, transfer call, etc; or you can create your own custom tool for the LLM to use.\n\n- Tools of LLM (with state) = general tools + state tools + state transitions\n- Tools of LLM (no state) = general tools\n\n\n- `kb_config?: { filter_score?: number; top_k?: number; }`\n Knowledge base configuration for RAG retrieval.\n - `filter_score?: number`\n Similarity threshold for filtering search results\n - `top_k?: number`\n Max number of knowledge base chunks to retrieve\n\n- `knowledge_base_ids?: string[]`\n A list of knowledge base ids to use for this resource.\n\n- `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n A list of MCPs to use for this LLM.\n\n- `model?: string`\n Select the underlying text LLM. If not set, would default to gpt-4.1.\n\n- `model_high_priority?: boolean`\n If set to true, will use high priority pool with more dedicated resource to ensure lower and more consistent latency, default to false. This feature usually comes with a higher cost.\n\n- `model_temperature?: number`\n If set, will control the randomness of the response. Value ranging from [0,1]. Lower value means more deterministic, while higher value means more random. If unset, default value 0 will apply. Note that for tool calling, a lower value is recommended.\n\n- `s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'`\n Select the underlying speech to speech model. Can only set this or model, not both.\n\n- `start_speaker?: 'user' | 'agent'`\n The speaker who starts the conversation. Required. Must be either 'user' or 'agent'.\n\n- `starting_state?: string`\n Name of the starting state. Required if states is not empty.\n\n- `states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: { properties: object; type: 'object'; required?: string[]; }; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]`\n States of the LLM. This is to help reduce prompt length and tool choices when the call can be broken into distinct states. With shorter prompts and less tools, the LLM can better focus and follow the rules, minimizing hallucination. If this field is not set, the agent would only have general prompt and general tools (essentially one state).\n\n- `tool_call_strict_mode?: boolean`\n Whether to use strict mode for tool calls. Only applicable when using certain supported models.\n\n- `version?: number`\n The version of the LLM.\n\n### Returns\n\n- `{ last_modification_timestamp: number; llm_id: string; begin_after_user_silence_ms?: number; begin_message?: string; default_dynamic_variables?: object; general_prompt?: string; general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; is_published?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; starting_state?: string; states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: object; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]; tool_call_strict_mode?: boolean; version?: number; }`\n\n - `last_modification_timestamp: number`\n - `llm_id: string`\n - `begin_after_user_silence_ms?: number`\n - `begin_message?: string`\n - `default_dynamic_variables?: object`\n - `general_prompt?: string`\n - `general_tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]`\n - `is_published?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model?: string`\n - `model_high_priority?: boolean`\n - `model_temperature?: number`\n - `s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'`\n - `start_speaker?: 'user' | 'agent'`\n - `starting_state?: string`\n - `states?: { name: string; edges?: { description: string; destination_state_name: string; parameters?: { properties: object; type: 'object'; required?: string[]; }; }[]; state_prompt?: string; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; }[]`\n - `tool_call_strict_mode?: boolean`\n - `version?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939');\n\nconsole.log(llmResponse);\n```",
1248
1248
  perLanguage: {
1249
1249
  http: {
1250
- example: 'curl https://api.retellai.com/update-retell-llm/$LLM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true,\n "version": 1\n }\'',
1250
+ example: 'curl https://api.retellai.com/update-retell-llm/$LLM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",\n "default_dynamic_variables": {\n "customer_name": "John Doe"\n },\n "general_prompt": "You are ...",\n "general_tools": [\n {\n "name": "end_call",\n "type": "end_call",\n "description": "End the call with user."\n }\n ],\n "model": "gpt-4.1",\n "model_high_priority": true,\n "s2s_model": "gpt-realtime-1.5",\n "starting_state": "information_collection",\n "states": [\n {\n "name": "information_collection",\n "edges": [\n {\n "description": "Transition to book an appointment.",\n "destination_state_name": "appointment_booking"\n }\n ],\n "state_prompt": "You will follow the steps below to collect information...",\n "tools": [\n {\n "name": "transfer_to_support",\n "transfer_destination": {\n "number": "16175551212",\n "type": "predefined"\n },\n "transfer_option": {\n "type": "cold_transfer",\n "show_transferee_as_caller": false\n },\n "type": "transfer_call",\n "description": "Transfer to the support team."\n }\n ]\n },\n {\n "name": "appointment_booking",\n "state_prompt": "You will follow the steps below to book an appointment...",\n "tools": [\n {\n "cal_api_key": "cal_live_xxxxxxxxxxxx",\n "event_type_id": 60444,\n "name": "book_appointment",\n "type": "book_appointment_cal",\n "description": "Book an annual check up.",\n "timezone": "America/Los_Angeles"\n }\n ]\n }\n ],\n "tool_call_strict_mode": true,\n "version": 1\n }\'',
1251
1251
  },
1252
1252
  python: {
1253
1253
  method: 'llm.update',
1254
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nllm_response = client.llm.update(\n llm_id="16b980523634a6dc504898cda492e939",\n begin_message="Hey I am a virtual assistant calling from Retell Hospital.",\n)\nprint(llm_response.llm_id)',
1254
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nllm_response = client.llm.update(\n llm_id="16b980523634a6dc504898cda492e939",\n begin_message="Hey I am a virtual assistant calling from Retell Hospital.",\n)\nprint(llm_response.llm_id)',
1255
1255
  },
1256
1256
  typescript: {
1257
1257
  method: 'client.llm.update',
1258
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939', {\n begin_message: 'Hey I am a virtual assistant calling from Retell Hospital.',\n});\n\nconsole.log(llmResponse.llm_id);",
1258
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939', {\n begin_message: 'Hey I am a virtual assistant calling from Retell Hospital.',\n});\n\nconsole.log(llmResponse.llm_id);",
1259
1259
  },
1260
1260
  },
1261
1261
  },
@@ -1271,15 +1271,15 @@ const EMBEDDED_METHODS = [
1271
1271
  markdown: "## delete\n\n`client.llm.delete(llm_id: string): void`\n\n**delete** `/delete-retell-llm/{llm_id}`\n\nDelete an existing Retell LLM Response Engine\n\n### Parameters\n\n- `llm_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.llm.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD')\n```",
1272
1272
  perLanguage: {
1273
1273
  http: {
1274
- example: 'curl https://api.retellai.com/delete-retell-llm/$LLM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
1274
+ example: 'curl https://api.retellai.com/delete-retell-llm/$LLM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1275
1275
  },
1276
1276
  python: {
1277
1277
  method: 'llm.delete',
1278
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.llm.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
1278
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.llm.delete(\n "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n)',
1279
1279
  },
1280
1280
  typescript: {
1281
1281
  method: 'client.llm.delete',
1282
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.llm.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
1282
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.llm.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');",
1283
1283
  },
1284
1284
  },
1285
1285
  },
@@ -1314,15 +1314,15 @@ const EMBEDDED_METHODS = [
1314
1314
  markdown: "## create\n\n`client.conversationFlow.create(model_choice: { model: string; type: 'cascading'; high_priority?: boolean; }, nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[], start_speaker: 'user' | 'agent', begin_after_user_silence_ms?: number, begin_tag_display_position?: { x?: number; y?: number; }, components?: { name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[], default_dynamic_variables?: object, global_prompt?: string, is_transfer_llm?: boolean, kb_config?: { filter_score?: number; top_k?: number; }, knowledge_base_ids?: string[], mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[], model_temperature?: number, notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[], start_node_id?: string, tool_call_strict_mode?: boolean, tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]): { conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: object; components?: object[]; default_dynamic_variables?: object; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model_choice?: object; model_temperature?: number; nodes?: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; notes?: object[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: object | object | object[]; }`\n\n**post** `/create-conversation-flow`\n\nCreate a new Conversation Flow that can be attached to an agent. This is used to generate response output for the agent.\n\n### Parameters\n\n- `model_choice: { model: string; type: 'cascading'; high_priority?: boolean; }`\n The model choice for the conversation flow.\n - `model: string`\n The LLM model to use\n - `type: 'cascading'`\n Type of model choice\n - `high_priority?: boolean`\n Whether to use high priority pool with more dedicated resource, default false\n\n- `nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n Array of nodes in the conversation flow.\n\n- `start_speaker: 'user' | 'agent'`\n Who starts the conversation - user or agent.\n\n- `begin_after_user_silence_ms?: number`\n If set, the AI will begin the conversation after waiting for the user for the duration (in milliseconds) specified by this attribute. This only applies if the agent is configured to wait for the user to speak first. If not set, the agent will wait indefinitely for the user to speak.\n\n- `begin_tag_display_position?: { x?: number; y?: number; }`\n Display position for the begin tag in the frontend.\n - `x?: number`\n - `y?: number`\n\n- `components?: { name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n Local components embedded within the conversation flow.\n\n- `default_dynamic_variables?: object`\n Default dynamic variables that can be referenced throughout the conversation flow.\n\n- `global_prompt?: string`\n Global prompt used in every node of the conversation flow.\n\n- `is_transfer_llm?: boolean`\n Whether this conversation flow is used for transfer LLM.\n\n- `kb_config?: { filter_score?: number; top_k?: number; }`\n Knowledge base configuration for RAG retrieval.\n - `filter_score?: number`\n Similarity threshold for filtering search results\n - `top_k?: number`\n Max number of knowledge base chunks to retrieve\n\n- `knowledge_base_ids?: string[]`\n Knowledge base IDs for RAG (Retrieval-Augmented Generation).\n\n- `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n A list of MCP server configurations to use for this conversation flow.\n\n- `model_temperature?: number`\n Controls the randomness of the model's responses. Lower values make responses more deterministic.\n\n- `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n Visual annotations displayed on the flow canvas.\n\n- `start_node_id?: string`\n ID of the start node in the conversation flow.\n\n- `tool_call_strict_mode?: boolean`\n Whether to use strict mode for tool calls. Only applicable when using certain supported models.\n\n- `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n Tools available in the conversation flow.\n\n### Returns\n\n- `{ conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: { x?: number; y?: number; }; components?: { name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]; default_dynamic_variables?: object; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_id: string`\n - `version: number`\n - `begin_after_user_silence_ms?: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `components?: { name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n - `default_dynamic_variables?: object`\n - `global_prompt?: string`\n - `is_transfer_llm?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }`\n - `model_temperature?: number`\n - `nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `start_speaker?: 'user' | 'agent'`\n - `tool_call_strict_mode?: boolean`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowResponse = await client.conversationFlow.create({\n model_choice: { model: 'gpt-4.1', type: 'cascading' },\n nodes: [{\n id: 'start',\n instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },\n type: 'conversation',\n}],\n start_speaker: 'agent',\n});\n\nconsole.log(conversationFlowResponse);\n```",
1315
1315
  perLanguage: {
1316
1316
  http: {
1317
- example: 'curl https://api.retellai.com/create-conversation-flow \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "model_choice": {\n "model": "gpt-4.1",\n "type": "cascading"\n },\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_speaker": "agent",\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "global_prompt": "You are a helpful customer service agent.",\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "start_node_id": "start",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1317
+ example: 'curl https://api.retellai.com/create-conversation-flow \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "model_choice": {\n "model": "gpt-4.1",\n "type": "cascading"\n },\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_speaker": "agent",\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "global_prompt": "You are a helpful customer service agent.",\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "start_node_id": "start",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1318
1318
  },
1319
1319
  python: {
1320
1320
  method: 'conversation_flow.create',
1321
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_response = client.conversation_flow.create(\n model_choice={\n "model": "gpt-4.1",\n "type": "cascading",\n },\n nodes=[{\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt",\n },\n "type": "conversation",\n }],\n start_speaker="agent",\n)\nprint(conversation_flow_response.conversation_flow_id)',
1321
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_response = client.conversation_flow.create(\n model_choice={\n "model": "gpt-4.1",\n "type": "cascading",\n },\n nodes=[{\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt",\n },\n "type": "conversation",\n }],\n start_speaker="agent",\n)\nprint(conversation_flow_response.conversation_flow_id)',
1322
1322
  },
1323
1323
  typescript: {
1324
1324
  method: 'client.conversationFlow.create',
1325
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowResponse = await client.conversationFlow.create({\n model_choice: { model: 'gpt-4.1', type: 'cascading' },\n nodes: [\n {\n id: 'start',\n instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },\n type: 'conversation',\n },\n ],\n start_speaker: 'agent',\n});\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
1325
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowResponse = await client.conversationFlow.create({\n model_choice: { model: 'gpt-4.1', type: 'cascading' },\n nodes: [\n {\n id: 'start',\n instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },\n type: 'conversation',\n },\n ],\n start_speaker: 'agent',\n});\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
1326
1326
  },
1327
1327
  },
1328
1328
  },
@@ -1339,15 +1339,15 @@ const EMBEDDED_METHODS = [
1339
1339
  markdown: "## retrieve\n\n`client.conversationFlow.retrieve(conversation_flow_id: string, version?: number): { conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: object; components?: object[]; default_dynamic_variables?: object; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model_choice?: object; model_temperature?: number; nodes?: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; notes?: object[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: object | object | object[]; }`\n\n**get** `/get-conversation-flow/{conversation_flow_id}`\n\nRetrieve details of a specific Conversation Flow\n\n### Parameters\n\n- `conversation_flow_id: string`\n\n- `version?: number`\n Optional version of the conversation flow to retrieve. Default to latest version.\n\n### Returns\n\n- `{ conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: { x?: number; y?: number; }; components?: { name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]; default_dynamic_variables?: object; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_id: string`\n - `version: number`\n - `begin_after_user_silence_ms?: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `components?: { name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n - `default_dynamic_variables?: object`\n - `global_prompt?: string`\n - `is_transfer_llm?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }`\n - `model_temperature?: number`\n - `nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `start_speaker?: 'user' | 'agent'`\n - `tool_call_strict_mode?: boolean`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id');\n\nconsole.log(conversationFlowResponse);\n```",
1340
1340
  perLanguage: {
1341
1341
  http: {
1342
- example: 'curl https://api.retellai.com/get-conversation-flow/$CONVERSATION_FLOW_ID \\\n -H "Authorization: Bearer $API_KEY"',
1342
+ example: 'curl https://api.retellai.com/get-conversation-flow/$CONVERSATION_FLOW_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1343
1343
  },
1344
1344
  python: {
1345
1345
  method: 'conversation_flow.retrieve',
1346
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_response = client.conversation_flow.retrieve(\n conversation_flow_id="conversation_flow_id",\n)\nprint(conversation_flow_response.conversation_flow_id)',
1346
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_response = client.conversation_flow.retrieve(\n conversation_flow_id="conversation_flow_id",\n)\nprint(conversation_flow_response.conversation_flow_id)',
1347
1347
  },
1348
1348
  typescript: {
1349
1349
  method: 'client.conversationFlow.retrieve',
1350
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id');\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
1350
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id');\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
1351
1351
  },
1352
1352
  },
1353
1353
  },
@@ -1364,15 +1364,15 @@ const EMBEDDED_METHODS = [
1364
1364
  markdown: "## list\n\n`client.conversationFlow.list(limit?: number, pagination_key?: string, pagination_key_version?: number): object[]`\n\n**get** `/list-conversation-flows`\n\nList all conversation flows that can be attached to an agent.\n\n### Parameters\n\n- `limit?: number`\n Limit the number of conversation flows returned. Default 1000, Max 1000. To retrieve more than 1000, use pagination_key to continue fetching the next page.\n\n- `pagination_key?: string`\n The pagination key to continue fetching the next page of conversation flows. Pagination key is represented by a conversation flow id here, and it's exclusive (not included in the fetched conversation flows). The last conversation flow id from the list conversation flows is usually used as pagination key here. If not set, will start from the beginning.\n\n- `pagination_key_version?: number`\n Specifies the version of the conversation flow associated with the pagination_key. When paginating, both the pagination_key and its version must be provided to ensure consistent ordering and to fetch the next page correctly.\n\n### Returns\n\n- `{ conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: { x?: number; y?: number; }; components?: { name: string; nodes: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; begin_tag_display_position?: object; mcps?: object[]; notes?: object[]; start_node_id?: string; tools?: object | object | object[]; }[]; default_dynamic_variables?: object; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; nodes?: { id: string; instruction: object | object; type: 'conversation'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowResponses = await client.conversationFlow.list();\n\nconsole.log(conversationFlowResponses);\n```",
1365
1365
  perLanguage: {
1366
1366
  http: {
1367
- example: 'curl https://api.retellai.com/list-conversation-flows \\\n -H "Authorization: Bearer $API_KEY"',
1367
+ example: 'curl https://api.retellai.com/list-conversation-flows \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1368
1368
  },
1369
1369
  python: {
1370
1370
  method: 'conversation_flow.list',
1371
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_responses = client.conversation_flow.list()\nprint(conversation_flow_responses)',
1371
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_responses = client.conversation_flow.list()\nprint(conversation_flow_responses)',
1372
1372
  },
1373
1373
  typescript: {
1374
1374
  method: 'client.conversationFlow.list',
1375
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowResponses = await client.conversationFlow.list();\n\nconsole.log(conversationFlowResponses);",
1375
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowResponses = await client.conversationFlow.list();\n\nconsole.log(conversationFlowResponses);",
1376
1376
  },
1377
1377
  },
1378
1378
  },
@@ -1409,15 +1409,15 @@ const EMBEDDED_METHODS = [
1409
1409
  markdown: "## update\n\n`client.conversationFlow.update(conversation_flow_id: string, version?: number, begin_after_user_silence_ms?: number, begin_tag_display_position?: { x?: number; y?: number; }, components?: { name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[], default_dynamic_variables?: object, global_prompt?: string, is_transfer_llm?: boolean, kb_config?: { filter_score?: number; top_k?: number; }, knowledge_base_ids?: string[], mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[], model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }, model_temperature?: number, nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[], notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[], start_node_id?: string, start_speaker?: 'user' | 'agent', tool_call_strict_mode?: boolean, tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]): { conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: object; components?: object[]; default_dynamic_variables?: object; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model_choice?: object; model_temperature?: number; nodes?: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; notes?: object[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: object | object | object[]; }`\n\n**patch** `/update-conversation-flow/{conversation_flow_id}`\n\nUpdate an existing conversation flow\n\n### Parameters\n\n- `conversation_flow_id: string`\n\n- `version?: number`\n Optional version of the conversation flow to update. Default to latest version.\n\n- `begin_after_user_silence_ms?: number`\n If set, the AI will begin the conversation after waiting for the user for the duration (in milliseconds) specified by this attribute. This only applies if the agent is configured to wait for the user to speak first. If not set, the agent will wait indefinitely for the user to speak.\n\n- `begin_tag_display_position?: { x?: number; y?: number; }`\n Display position for the begin tag in the frontend.\n - `x?: number`\n - `y?: number`\n\n- `components?: { name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n Local components embedded within the conversation flow.\n\n- `default_dynamic_variables?: object`\n Default dynamic variables that can be referenced throughout the conversation flow.\n\n- `global_prompt?: string`\n Global prompt used in every node of the conversation flow.\n\n- `is_transfer_llm?: boolean`\n Whether this conversation flow is used for transfer LLM.\n\n- `kb_config?: { filter_score?: number; top_k?: number; }`\n Knowledge base configuration for RAG retrieval.\n - `filter_score?: number`\n Similarity threshold for filtering search results\n - `top_k?: number`\n Max number of knowledge base chunks to retrieve\n\n- `knowledge_base_ids?: string[]`\n Knowledge base IDs for RAG (Retrieval-Augmented Generation).\n\n- `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n A list of MCP server configurations to use for this conversation flow.\n\n- `model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }`\n The model choice for the conversation flow.\n - `model: string`\n The LLM model to use\n - `type: 'cascading'`\n Type of model choice\n - `high_priority?: boolean`\n Whether to use high priority pool with more dedicated resource, default false\n\n- `model_temperature?: number`\n Controls the randomness of the model's responses. Lower values make responses more deterministic.\n\n- `nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n Array of nodes in the conversation flow.\n\n- `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n Visual annotations displayed on the flow canvas.\n\n- `start_node_id?: string`\n ID of the start node in the conversation flow.\n\n- `start_speaker?: 'user' | 'agent'`\n Who starts the conversation - user or agent.\n\n- `tool_call_strict_mode?: boolean`\n Whether to use strict mode for tool calls. Only applicable when using certain supported models.\n\n- `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n Tools available in the conversation flow.\n\n### Returns\n\n- `{ conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: { x?: number; y?: number; }; components?: { name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]; default_dynamic_variables?: object; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_id: string`\n - `version: number`\n - `begin_after_user_silence_ms?: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `components?: { name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n - `default_dynamic_variables?: object`\n - `global_prompt?: string`\n - `is_transfer_llm?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }`\n - `model_temperature?: number`\n - `nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `start_speaker?: 'user' | 'agent'`\n - `tool_call_strict_mode?: boolean`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id');\n\nconsole.log(conversationFlowResponse);\n```",
1410
1410
  perLanguage: {
1411
1411
  http: {
1412
- example: 'curl https://api.retellai.com/update-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "global_prompt": "You are a helpful customer service agent.",\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_node_id": "start",\n "start_speaker": "agent",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1412
+ example: 'curl https://api.retellai.com/update-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "begin_after_user_silence_ms": 2000,\n "default_dynamic_variables": {\n "company_name": "Retell Inc",\n "support_hours": "9 AM - 5 PM"\n },\n "global_prompt": "You are a helpful customer service agent.",\n "knowledge_base_ids": [\n "kb_001",\n "kb_002"\n ],\n "model_temperature": 0.7,\n "nodes": [\n {\n "id": "start",\n "instruction": {\n "text": "Greet the customer and ask how you can help them.",\n "type": "prompt"\n },\n "type": "conversation",\n "edges": [\n {\n "id": "edge_1",\n "transition_condition": {\n "prompt": "Customer wants to book appointment",\n "type": "prompt"\n },\n "destination_node_id": "book_appointment"\n }\n ]\n }\n ],\n "start_node_id": "start",\n "start_speaker": "agent",\n "tool_call_strict_mode": true,\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1413
1413
  },
1414
1414
  python: {
1415
1415
  method: 'conversation_flow.update',
1416
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_response = client.conversation_flow.update(\n conversation_flow_id="conversation_flow_id",\n)\nprint(conversation_flow_response.conversation_flow_id)',
1416
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_response = client.conversation_flow.update(\n conversation_flow_id="conversation_flow_id",\n)\nprint(conversation_flow_response.conversation_flow_id)',
1417
1417
  },
1418
1418
  typescript: {
1419
1419
  method: 'client.conversationFlow.update',
1420
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id');\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
1420
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id');\n\nconsole.log(conversationFlowResponse.conversation_flow_id);",
1421
1421
  },
1422
1422
  },
1423
1423
  },
@@ -1433,15 +1433,15 @@ const EMBEDDED_METHODS = [
1433
1433
  markdown: "## delete\n\n`client.conversationFlow.delete(conversation_flow_id: string): void`\n\n**delete** `/delete-conversation-flow/{conversation_flow_id}`\n\nDelete a conversation flow and all its versions\n\n### Parameters\n\n- `conversation_flow_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.conversationFlow.delete('conversation_flow_id')\n```",
1434
1434
  perLanguage: {
1435
1435
  http: {
1436
- example: 'curl https://api.retellai.com/delete-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
1436
+ example: 'curl https://api.retellai.com/delete-conversation-flow/$CONVERSATION_FLOW_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1437
1437
  },
1438
1438
  python: {
1439
1439
  method: 'conversation_flow.delete',
1440
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.conversation_flow.delete(\n "conversation_flow_id",\n)',
1440
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.conversation_flow.delete(\n "conversation_flow_id",\n)',
1441
1441
  },
1442
1442
  typescript: {
1443
1443
  method: 'client.conversationFlow.delete',
1444
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.conversationFlow.delete('conversation_flow_id');",
1444
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.conversationFlow.delete('conversation_flow_id');",
1445
1445
  },
1446
1446
  },
1447
1447
  },
@@ -1466,15 +1466,15 @@ const EMBEDDED_METHODS = [
1466
1466
  markdown: "## create\n\n`client.conversationFlowComponent.create(name: string, nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[], begin_tag_display_position?: { x?: number; y?: number; }, mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[], notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[], start_node_id?: string, tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]): { conversation_flow_component_id: string; name: string; nodes: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; user_modified_timestamp: number; begin_tag_display_position?: object; linked_conversation_flow_ids?: string[]; mcps?: object[]; notes?: object[]; start_node_id?: string; tools?: object | object | object[]; }`\n\n**post** `/create-conversation-flow-component`\n\nCreate a new shared conversation flow component\n\n### Parameters\n\n- `name: string`\n Name of the component\n\n- `nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n Nodes that make up the component\n\n- `begin_tag_display_position?: { x?: number; y?: number; }`\n Display position for the begin tag in the frontend\n - `x?: number`\n - `y?: number`\n\n- `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n A list of MCP server configurations to use for this component\n\n- `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n Visual annotations displayed on the flow canvas.\n\n- `start_node_id?: string`\n ID of the starting node\n\n- `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n Tools available within the component\n\n### Returns\n\n- `{ conversation_flow_component_id: string; name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; user_modified_timestamp: number; begin_tag_display_position?: { x?: number; y?: number; }; linked_conversation_flow_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_component_id: string`\n - `name: string`\n - `nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `user_modified_timestamp: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `linked_conversation_flow_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.create({ name: 'Customer Information Collector', nodes: [{\n id: 'collect_info',\n instruction: { text: 'Ask the customer for their name and contact information.', type: 'prompt' },\n type: 'conversation',\n}] });\n\nconsole.log(conversationFlowComponentResponse);\n```",
1467
1467
  perLanguage: {
1468
1468
  http: {
1469
- example: 'curl https://api.retellai.com/create-conversation-flow-component \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1469
+ example: 'curl https://api.retellai.com/create-conversation-flow-component \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1470
1470
  },
1471
1471
  python: {
1472
1472
  method: 'conversation_flow_component.create',
1473
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_component_response = client.conversation_flow_component.create(\n name="Customer Information Collector",\n nodes=[{\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt",\n },\n "type": "conversation",\n }],\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
1473
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_component_response = client.conversation_flow_component.create(\n name="Customer Information Collector",\n nodes=[{\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt",\n },\n "type": "conversation",\n }],\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
1474
1474
  },
1475
1475
  typescript: {
1476
1476
  method: 'client.conversationFlowComponent.create',
1477
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.create({\n name: 'Customer Information Collector',\n nodes: [\n {\n id: 'collect_info',\n instruction: {\n text: 'Ask the customer for their name and contact information.',\n type: 'prompt',\n },\n type: 'conversation',\n },\n ],\n});\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
1477
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.create({\n name: 'Customer Information Collector',\n nodes: [\n {\n id: 'collect_info',\n instruction: {\n text: 'Ask the customer for their name and contact information.',\n type: 'prompt',\n },\n type: 'conversation',\n },\n ],\n});\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
1478
1478
  },
1479
1479
  },
1480
1480
  },
@@ -1491,15 +1491,15 @@ const EMBEDDED_METHODS = [
1491
1491
  markdown: "## retrieve\n\n`client.conversationFlowComponent.retrieve(conversation_flow_component_id: string): { conversation_flow_component_id: string; name: string; nodes: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; user_modified_timestamp: number; begin_tag_display_position?: object; linked_conversation_flow_ids?: string[]; mcps?: object[]; notes?: object[]; start_node_id?: string; tools?: object | object | object[]; }`\n\n**get** `/get-conversation-flow-component/{conversation_flow_component_id}`\n\nGet a shared conversation flow component\n\n### Parameters\n\n- `conversation_flow_component_id: string`\n\n### Returns\n\n- `{ conversation_flow_component_id: string; name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; user_modified_timestamp: number; begin_tag_display_position?: { x?: number; y?: number; }; linked_conversation_flow_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_component_id: string`\n - `name: string`\n - `nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `user_modified_timestamp: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `linked_conversation_flow_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.retrieve('conversation_flow_component_id');\n\nconsole.log(conversationFlowComponentResponse);\n```",
1492
1492
  perLanguage: {
1493
1493
  http: {
1494
- example: 'curl https://api.retellai.com/get-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -H "Authorization: Bearer $API_KEY"',
1494
+ example: 'curl https://api.retellai.com/get-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1495
1495
  },
1496
1496
  python: {
1497
1497
  method: 'conversation_flow_component.retrieve',
1498
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_component_response = client.conversation_flow_component.retrieve(\n "conversation_flow_component_id",\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
1498
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_component_response = client.conversation_flow_component.retrieve(\n "conversation_flow_component_id",\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
1499
1499
  },
1500
1500
  typescript: {
1501
1501
  method: 'client.conversationFlowComponent.retrieve',
1502
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.retrieve(\n 'conversation_flow_component_id',\n);\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
1502
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.retrieve(\n 'conversation_flow_component_id',\n);\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
1503
1503
  },
1504
1504
  },
1505
1505
  },
@@ -1515,15 +1515,15 @@ const EMBEDDED_METHODS = [
1515
1515
  markdown: "## list\n\n`client.conversationFlowComponent.list(): object[]`\n\n**get** `/list-conversation-flow-components`\n\nList shared conversation flow components\n\n### Returns\n\n- `{ conversation_flow_component_id: string; name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; user_modified_timestamp: number; begin_tag_display_position?: { x?: number; y?: number; }; linked_conversation_flow_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowComponentResponses = await client.conversationFlowComponent.list();\n\nconsole.log(conversationFlowComponentResponses);\n```",
1516
1516
  perLanguage: {
1517
1517
  http: {
1518
- example: 'curl https://api.retellai.com/list-conversation-flow-components \\\n -H "Authorization: Bearer $API_KEY"',
1518
+ example: 'curl https://api.retellai.com/list-conversation-flow-components \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1519
1519
  },
1520
1520
  python: {
1521
1521
  method: 'conversation_flow_component.list',
1522
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_component_responses = client.conversation_flow_component.list()\nprint(conversation_flow_component_responses)',
1522
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_component_responses = client.conversation_flow_component.list()\nprint(conversation_flow_component_responses)',
1523
1523
  },
1524
1524
  typescript: {
1525
1525
  method: 'client.conversationFlowComponent.list',
1526
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowComponentResponses = await client.conversationFlowComponent.list();\n\nconsole.log(conversationFlowComponentResponses);",
1526
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponentResponses = await client.conversationFlowComponent.list();\n\nconsole.log(conversationFlowComponentResponses);",
1527
1527
  },
1528
1528
  },
1529
1529
  },
@@ -1549,15 +1549,15 @@ const EMBEDDED_METHODS = [
1549
1549
  markdown: "## update\n\n`client.conversationFlowComponent.update(conversation_flow_component_id: string, begin_tag_display_position?: { x?: number; y?: number; }, mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[], name?: string, nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[], notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[], start_node_id?: string, tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]): { conversation_flow_component_id: string; name: string; nodes: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; user_modified_timestamp: number; begin_tag_display_position?: object; linked_conversation_flow_ids?: string[]; mcps?: object[]; notes?: object[]; start_node_id?: string; tools?: object | object | object[]; }`\n\n**patch** `/update-conversation-flow-component/{conversation_flow_component_id}`\n\nUpdate an existing shared conversation flow component\n\n### Parameters\n\n- `conversation_flow_component_id: string`\n\n- `begin_tag_display_position?: { x?: number; y?: number; }`\n Display position for the begin tag in the frontend\n - `x?: number`\n - `y?: number`\n\n- `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n A list of MCP server configurations to use for this component\n\n- `name?: string`\n Name of the component\n\n- `nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n Nodes that make up the component\n\n- `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n Visual annotations displayed on the flow canvas.\n\n- `start_node_id?: string`\n ID of the starting node\n\n- `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n Tools available within the component\n\n### Returns\n\n- `{ conversation_flow_component_id: string; name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; user_modified_timestamp: number; begin_tag_display_position?: { x?: number; y?: number; }; linked_conversation_flow_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_component_id: string`\n - `name: string`\n - `nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `user_modified_timestamp: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `linked_conversation_flow_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.update('conversation_flow_component_id');\n\nconsole.log(conversationFlowComponentResponse);\n```",
1550
1550
  perLanguage: {
1551
1551
  http: {
1552
- example: 'curl https://api.retellai.com/update-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1552
+ example: 'curl https://api.retellai.com/update-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "name": "Customer Information Collector",\n "nodes": [\n {\n "id": "collect_info",\n "instruction": {\n "text": "Ask the customer for their name and contact information.",\n "type": "prompt"\n },\n "type": "conversation"\n }\n ],\n "start_node_id": "collect_info",\n "tools": [\n {\n "name": "get_customer_info",\n "type": "custom",\n "url": "https://api.example.com/customer",\n "description": "Get customer information from database",\n "method": "GET",\n "tool_id": "tool_001"\n }\n ]\n }\'',
1553
1553
  },
1554
1554
  python: {
1555
1555
  method: 'conversation_flow_component.update',
1556
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconversation_flow_component_response = client.conversation_flow_component.update(\n conversation_flow_component_id="conversation_flow_component_id",\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
1556
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconversation_flow_component_response = client.conversation_flow_component.update(\n conversation_flow_component_id="conversation_flow_component_id",\n)\nprint(conversation_flow_component_response.conversation_flow_component_id)',
1557
1557
  },
1558
1558
  typescript: {
1559
1559
  method: 'client.conversationFlowComponent.update',
1560
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.update(\n 'conversation_flow_component_id',\n);\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
1560
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst conversationFlowComponentResponse = await client.conversationFlowComponent.update(\n 'conversation_flow_component_id',\n);\n\nconsole.log(conversationFlowComponentResponse.conversation_flow_component_id);",
1561
1561
  },
1562
1562
  },
1563
1563
  },
@@ -1573,15 +1573,15 @@ const EMBEDDED_METHODS = [
1573
1573
  markdown: "## delete\n\n`client.conversationFlowComponent.delete(conversation_flow_component_id: string): void`\n\n**delete** `/delete-conversation-flow-component/{conversation_flow_component_id}`\n\nDelete a shared conversation flow component. When deleting a shared component, creates local copies for all linked conversation flows.\n\n### Parameters\n\n- `conversation_flow_component_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.conversationFlowComponent.delete('conversation_flow_component_id')\n```",
1574
1574
  perLanguage: {
1575
1575
  http: {
1576
- example: 'curl https://api.retellai.com/delete-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
1576
+ example: 'curl https://api.retellai.com/delete-conversation-flow-component/$CONVERSATION_FLOW_COMPONENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1577
1577
  },
1578
1578
  python: {
1579
1579
  method: 'conversation_flow_component.delete',
1580
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.conversation_flow_component.delete(\n "conversation_flow_component_id",\n)',
1580
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.conversation_flow_component.delete(\n "conversation_flow_component_id",\n)',
1581
1581
  },
1582
1582
  typescript: {
1583
1583
  method: 'client.conversationFlowComponent.delete',
1584
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.conversationFlowComponent.delete('conversation_flow_component_id');",
1584
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.conversationFlowComponent.delete('conversation_flow_component_id');",
1585
1585
  },
1586
1586
  },
1587
1587
  },
@@ -1606,15 +1606,15 @@ const EMBEDDED_METHODS = [
1606
1606
  markdown: "## create\n\n`client.knowledgeBase.create(knowledge_base_name: string, enable_auto_refresh?: boolean, knowledge_base_files?: string[], knowledge_base_texts?: { text: string; title: string; }[], knowledge_base_urls?: string[], max_chunk_size?: number, min_chunk_size?: number): { knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: object | object | object[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n**post** `/create-knowledge-base`\n\nCreate a new knowledge base\n\n### Parameters\n\n- `knowledge_base_name: string`\n Name of the knowledge base. Must be less than 40 characters.\n\n- `enable_auto_refresh?: boolean`\n Whether to enable auto refresh for the knowledge base urls. If set to true, will retrieve the data from the specified url every 12 hours.\n\n- `knowledge_base_files?: string[]`\n Files to add to the knowledge base. Limit to 25 files, where each file is limited to 50MB.\n\n- `knowledge_base_texts?: { text: string; title: string; }[]`\n Texts to add to the knowledge base.\n\n- `knowledge_base_urls?: string[]`\n URLs to be scraped and added to the knowledge base. Must be valid urls.\n\n- `max_chunk_size?: number`\n Maximum number of characters per chunk when splitting knowledge base. Default is 2000. content. Immutable after creation.\n\n- `min_chunk_size?: number`\n Minimum number of characters per chunk. Chunks smaller than this will be merged with adjacent chunks. Must be less than max_chunk_size. Immutable after creation. Default is 400.\n\n### Returns\n\n- `{ knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n - `knowledge_base_id: string`\n - `knowledge_base_name: string`\n - `status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'`\n - `enable_auto_refresh?: boolean`\n - `knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]`\n - `last_refreshed_timestamp?: number`\n - `max_chunk_size?: number`\n - `min_chunk_size?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst knowledgeBaseResponse = await client.knowledgeBase.create({ knowledge_base_name: 'Sample KB' });\n\nconsole.log(knowledgeBaseResponse);\n```",
1607
1607
  perLanguage: {
1608
1608
  http: {
1609
- example: 'curl https://api.retellai.com/create-knowledge-base \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -F knowledge_base_name=\'Sample KB\' \\\n -F enable_auto_refresh=true \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\' \\\n -F max_chunk_size=2000 \\\n -F min_chunk_size=400',
1609
+ example: 'curl https://api.retellai.com/create-knowledge-base \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F knowledge_base_name=\'Sample KB\' \\\n -F enable_auto_refresh=true \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\' \\\n -F max_chunk_size=2000 \\\n -F min_chunk_size=400',
1610
1610
  },
1611
1611
  python: {
1612
1612
  method: 'knowledge_base.create',
1613
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nknowledge_base_response = client.knowledge_base.create(\n knowledge_base_name="Sample KB",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1613
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.create(\n knowledge_base_name="Sample KB",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1614
1614
  },
1615
1615
  typescript: {
1616
1616
  method: 'client.knowledgeBase.create',
1617
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.create({\n knowledge_base_name: 'Sample KB',\n});\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1617
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.create({\n knowledge_base_name: 'Sample KB',\n});\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1618
1618
  },
1619
1619
  },
1620
1620
  },
@@ -1631,15 +1631,15 @@ const EMBEDDED_METHODS = [
1631
1631
  markdown: "## retrieve\n\n`client.knowledgeBase.retrieve(knowledge_base_id: string): { knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: object | object | object[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n**get** `/get-knowledge-base/{knowledge_base_id}`\n\nRetrieve details of a specific knowledge base\n\n### Parameters\n\n- `knowledge_base_id: string`\n\n### Returns\n\n- `{ knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n - `knowledge_base_id: string`\n - `knowledge_base_name: string`\n - `status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'`\n - `enable_auto_refresh?: boolean`\n - `knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]`\n - `last_refreshed_timestamp?: number`\n - `max_chunk_size?: number`\n - `min_chunk_size?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst knowledgeBaseResponse = await client.knowledgeBase.retrieve('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse);\n```",
1632
1632
  perLanguage: {
1633
1633
  http: {
1634
- example: 'curl https://api.retellai.com/get-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -H "Authorization: Bearer $API_KEY"',
1634
+ example: 'curl https://api.retellai.com/get-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1635
1635
  },
1636
1636
  python: {
1637
1637
  method: 'knowledge_base.retrieve',
1638
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nknowledge_base_response = client.knowledge_base.retrieve(\n "kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1638
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.retrieve(\n "kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1639
1639
  },
1640
1640
  typescript: {
1641
1641
  method: 'client.knowledgeBase.retrieve',
1642
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.retrieve('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1642
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.retrieve('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1643
1643
  },
1644
1644
  },
1645
1645
  },
@@ -1655,15 +1655,15 @@ const EMBEDDED_METHODS = [
1655
1655
  markdown: "## list\n\n`client.knowledgeBase.list(): object[]`\n\n**get** `/list-knowledge-bases`\n\nList all knowledge bases\n\n### Returns\n\n- `{ knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst knowledgeBaseResponses = await client.knowledgeBase.list();\n\nconsole.log(knowledgeBaseResponses);\n```",
1656
1656
  perLanguage: {
1657
1657
  http: {
1658
- example: 'curl https://api.retellai.com/list-knowledge-bases \\\n -H "Authorization: Bearer $API_KEY"',
1658
+ example: 'curl https://api.retellai.com/list-knowledge-bases \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1659
1659
  },
1660
1660
  python: {
1661
1661
  method: 'knowledge_base.list',
1662
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nknowledge_base_responses = client.knowledge_base.list()\nprint(knowledge_base_responses)',
1662
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_responses = client.knowledge_base.list()\nprint(knowledge_base_responses)',
1663
1663
  },
1664
1664
  typescript: {
1665
1665
  method: 'client.knowledgeBase.list',
1666
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst knowledgeBaseResponses = await client.knowledgeBase.list();\n\nconsole.log(knowledgeBaseResponses);",
1666
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponses = await client.knowledgeBase.list();\n\nconsole.log(knowledgeBaseResponses);",
1667
1667
  },
1668
1668
  },
1669
1669
  },
@@ -1679,15 +1679,15 @@ const EMBEDDED_METHODS = [
1679
1679
  markdown: "## delete\n\n`client.knowledgeBase.delete(knowledge_base_id: string): void`\n\n**delete** `/delete-knowledge-base/{knowledge_base_id}`\n\nDelete an existing knowledge base\n\n### Parameters\n\n- `knowledge_base_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.knowledgeBase.delete('kb_1234567890')\n```",
1680
1680
  perLanguage: {
1681
1681
  http: {
1682
- example: 'curl https://api.retellai.com/delete-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
1682
+ example: 'curl https://api.retellai.com/delete-knowledge-base/$KNOWLEDGE_BASE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1683
1683
  },
1684
1684
  python: {
1685
1685
  method: 'knowledge_base.delete',
1686
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.knowledge_base.delete(\n "kb_1234567890",\n)',
1686
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.knowledge_base.delete(\n "kb_1234567890",\n)',
1687
1687
  },
1688
1688
  typescript: {
1689
1689
  method: 'client.knowledgeBase.delete',
1690
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.knowledgeBase.delete('kb_1234567890');",
1690
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.knowledgeBase.delete('kb_1234567890');",
1691
1691
  },
1692
1692
  },
1693
1693
  },
@@ -1709,15 +1709,15 @@ const EMBEDDED_METHODS = [
1709
1709
  markdown: "## add-sources\n\n`client.knowledgeBase.addSources(knowledge_base_id: string, knowledge_base_files?: string[], knowledge_base_texts?: { text: string; title: string; }[], knowledge_base_urls?: string[]): { knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: object | object | object[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n**post** `/add-knowledge-base-sources/{knowledge_base_id}`\n\nAdd sources to a knowledge base\n\n### Parameters\n\n- `knowledge_base_id: string`\n\n- `knowledge_base_files?: string[]`\n Files to add to the knowledge base. Limit to 25 files, where each file is limited to 50MB.\n\n- `knowledge_base_texts?: { text: string; title: string; }[]`\n Texts to add to the knowledge base.\n\n- `knowledge_base_urls?: string[]`\n URLs to be scraped and added to the knowledge base. Must be valid urls.\n\n### Returns\n\n- `{ knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n - `knowledge_base_id: string`\n - `knowledge_base_name: string`\n - `status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'`\n - `enable_auto_refresh?: boolean`\n - `knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]`\n - `last_refreshed_timestamp?: number`\n - `max_chunk_size?: number`\n - `min_chunk_size?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst knowledgeBaseResponse = await client.knowledgeBase.addSources('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse);\n```",
1710
1710
  perLanguage: {
1711
1711
  http: {
1712
- example: 'curl https://api.retellai.com/add-knowledge-base-sources/$KNOWLEDGE_BASE_ID \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\'',
1712
+ example: 'curl https://api.retellai.com/add-knowledge-base-sources/$KNOWLEDGE_BASE_ID \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F knowledge_base_urls=\'["https://www.example.com","https://www.retellai.com"]\'',
1713
1713
  },
1714
1714
  python: {
1715
1715
  method: 'knowledge_base.add_sources',
1716
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nknowledge_base_response = client.knowledge_base.add_sources(\n knowledge_base_id="kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1716
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.add_sources(\n knowledge_base_id="kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1717
1717
  },
1718
1718
  typescript: {
1719
1719
  method: 'client.knowledgeBase.addSources',
1720
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.addSources('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1720
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.addSources('kb_1234567890');\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1721
1721
  },
1722
1722
  },
1723
1723
  },
@@ -1734,15 +1734,15 @@ const EMBEDDED_METHODS = [
1734
1734
  markdown: "## delete-source\n\n`client.knowledgeBase.deleteSource(knowledge_base_id: string, source_id: string): { knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: object | object | object[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n**delete** `/delete-knowledge-base-source/{knowledge_base_id}/source/{source_id}`\n\nDelete an existing source from knowledge base\n\n### Parameters\n\n- `knowledge_base_id: string`\n\n- `source_id: string`\n\n### Returns\n\n- `{ knowledge_base_id: string; knowledge_base_name: string; status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'; enable_auto_refresh?: boolean; knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]; last_refreshed_timestamp?: number; max_chunk_size?: number; min_chunk_size?: number; }`\n\n - `knowledge_base_id: string`\n - `knowledge_base_name: string`\n - `status: 'in_progress' | 'complete' | 'error' | 'refreshing_in_progress'`\n - `enable_auto_refresh?: boolean`\n - `knowledge_base_sources?: { file_url: string; filename: string; source_id: string; type: 'document'; } | { content_url: string; source_id: string; title: string; type: 'text'; } | { source_id: string; type: 'url'; url: string; }[]`\n - `last_refreshed_timestamp?: number`\n - `max_chunk_size?: number`\n - `min_chunk_size?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst knowledgeBaseResponse = await client.knowledgeBase.deleteSource('source_1234567890', { knowledge_base_id: 'kb_1234567890' });\n\nconsole.log(knowledgeBaseResponse);\n```",
1735
1735
  perLanguage: {
1736
1736
  http: {
1737
- example: 'curl https://api.retellai.com/delete-knowledge-base-source/$KNOWLEDGE_BASE_ID/source/$SOURCE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
1737
+ example: 'curl https://api.retellai.com/delete-knowledge-base-source/$KNOWLEDGE_BASE_ID/source/$SOURCE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1738
1738
  },
1739
1739
  python: {
1740
1740
  method: 'knowledge_base.delete_source',
1741
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nknowledge_base_response = client.knowledge_base.delete_source(\n source_id="source_1234567890",\n knowledge_base_id="kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1741
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nknowledge_base_response = client.knowledge_base.delete_source(\n source_id="source_1234567890",\n knowledge_base_id="kb_1234567890",\n)\nprint(knowledge_base_response.knowledge_base_id)',
1742
1742
  },
1743
1743
  typescript: {
1744
1744
  method: 'client.knowledgeBase.deleteSource',
1745
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.deleteSource('source_1234567890', {\n knowledge_base_id: 'kb_1234567890',\n});\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1745
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst knowledgeBaseResponse = await client.knowledgeBase.deleteSource('source_1234567890', {\n knowledge_base_id: 'kb_1234567890',\n});\n\nconsole.log(knowledgeBaseResponse.knowledge_base_id);",
1746
1746
  },
1747
1747
  },
1748
1748
  },
@@ -1764,15 +1764,15 @@ const EMBEDDED_METHODS = [
1764
1764
  markdown: "## add-resource\n\n`client.voice.addResource(provider_voice_id: string, voice_name: string, public_user_id?: string, voice_provider?: 'elevenlabs' | 'cartesia' | 'minimax' | 'fish_audio'): { gender: 'male' | 'female'; provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'; voice_id: string; voice_name: string; accent?: string; age?: string; preview_audio_url?: string; }`\n\n**post** `/add-community-voice`\n\nAdd a community voice to the voice library\n\n### Parameters\n\n- `provider_voice_id: string`\n Voice id assigned by the provider.\n\n- `voice_name: string`\n A custom name for the voice.\n\n- `public_user_id?: string`\n Required for ElevenLabs only. User id of the voice owner.\n\n- `voice_provider?: 'elevenlabs' | 'cartesia' | 'minimax' | 'fish_audio'`\n Voice provider to add the voice from.\n\n### Returns\n\n- `{ gender: 'male' | 'female'; provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'; voice_id: string; voice_name: string; accent?: string; age?: string; preview_audio_url?: string; }`\n\n - `gender: 'male' | 'female'`\n - `provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'`\n - `voice_id: string`\n - `voice_name: string`\n - `accent?: string`\n - `age?: string`\n - `preview_audio_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst voiceResponse = await client.voice.addResource({ provider_voice_id: 'provider_voice_id', voice_name: 'x' });\n\nconsole.log(voiceResponse);\n```",
1765
1765
  perLanguage: {
1766
1766
  http: {
1767
- example: 'curl https://api.retellai.com/add-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "provider_voice_id": "provider_voice_id",\n "voice_name": "x"\n }\'',
1767
+ example: 'curl https://api.retellai.com/add-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "provider_voice_id": "provider_voice_id",\n "voice_name": "x"\n }\'',
1768
1768
  },
1769
1769
  python: {
1770
1770
  method: 'voice.add_resource',
1771
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nvoice_response = client.voice.add_resource(\n provider_voice_id="provider_voice_id",\n voice_name="x",\n)\nprint(voice_response.provider)',
1771
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_response = client.voice.add_resource(\n provider_voice_id="provider_voice_id",\n voice_name="x",\n)\nprint(voice_response.provider)',
1772
1772
  },
1773
1773
  typescript: {
1774
1774
  method: 'client.voice.addResource',
1775
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst voiceResponse = await client.voice.addResource({\n provider_voice_id: 'provider_voice_id',\n voice_name: 'x',\n});\n\nconsole.log(voiceResponse.provider);",
1775
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponse = await client.voice.addResource({\n provider_voice_id: 'provider_voice_id',\n voice_name: 'x',\n});\n\nconsole.log(voiceResponse.provider);",
1776
1776
  },
1777
1777
  },
1778
1778
  },
@@ -1793,15 +1793,15 @@ const EMBEDDED_METHODS = [
1793
1793
  markdown: "## clone\n\n`client.voice.clone(files: string[], voice_name: string, voice_provider: 'elevenlabs' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'): { gender: 'male' | 'female'; provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'; voice_id: string; voice_name: string; accent?: string; age?: string; preview_audio_url?: string; }`\n\n**post** `/clone-voice`\n\nClone a voice from audio files\n\n### Parameters\n\n- `files: string[]`\n Audio files to use for voice cloning. Up to 25 files allowed. For Cartesia and MiniMax, only 1 file is supported. For Inworld, up to 3 files are supported.\n\n- `voice_name: string`\n Name for the cloned voice\n\n- `voice_provider: 'elevenlabs' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'`\n Voice provider to use for cloning.\n\n### Returns\n\n- `{ gender: 'male' | 'female'; provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'; voice_id: string; voice_name: string; accent?: string; age?: string; preview_audio_url?: string; }`\n\n - `gender: 'male' | 'female'`\n - `provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'`\n - `voice_id: string`\n - `voice_name: string`\n - `accent?: string`\n - `age?: string`\n - `preview_audio_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst voiceResponse = await client.voice.clone({\n files: [fs.createReadStream('path/to/file')],\n voice_name: 'x',\n voice_provider: 'elevenlabs',\n});\n\nconsole.log(voiceResponse);\n```",
1794
1794
  perLanguage: {
1795
1795
  http: {
1796
- example: 'curl https://api.retellai.com/clone-voice \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -F files=\'["Example data"]\' \\\n -F voice_name=x \\\n -F voice_provider=elevenlabs',
1796
+ example: 'curl https://api.retellai.com/clone-voice \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -F files=\'["Example data"]\' \\\n -F voice_name=x \\\n -F voice_provider=elevenlabs',
1797
1797
  },
1798
1798
  python: {
1799
1799
  method: 'voice.clone',
1800
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nvoice_response = client.voice.clone(\n files=[b"Example data"],\n voice_name="x",\n voice_provider="elevenlabs",\n)\nprint(voice_response.provider)',
1800
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_response = client.voice.clone(\n files=[b"Example data"],\n voice_name="x",\n voice_provider="elevenlabs",\n)\nprint(voice_response.provider)',
1801
1801
  },
1802
1802
  typescript: {
1803
1803
  method: 'client.voice.clone',
1804
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst voiceResponse = await client.voice.clone({\n files: [fs.createReadStream('path/to/file')],\n voice_name: 'x',\n voice_provider: 'elevenlabs',\n});\n\nconsole.log(voiceResponse.provider);",
1804
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponse = await client.voice.clone({\n files: [fs.createReadStream('path/to/file')],\n voice_name: 'x',\n voice_provider: 'elevenlabs',\n});\n\nconsole.log(voiceResponse.provider);",
1805
1805
  },
1806
1806
  },
1807
1807
  },
@@ -1818,15 +1818,15 @@ const EMBEDDED_METHODS = [
1818
1818
  markdown: "## retrieve\n\n`client.voice.retrieve(voice_id: string): { gender: 'male' | 'female'; provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'; voice_id: string; voice_name: string; accent?: string; age?: string; preview_audio_url?: string; }`\n\n**get** `/get-voice/{voice_id}`\n\nRetrieve details of a specific voice\n\n### Parameters\n\n- `voice_id: string`\n\n### Returns\n\n- `{ gender: 'male' | 'female'; provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'; voice_id: string; voice_name: string; accent?: string; age?: string; preview_audio_url?: string; }`\n\n - `gender: 'male' | 'female'`\n - `provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'`\n - `voice_id: string`\n - `voice_name: string`\n - `accent?: string`\n - `age?: string`\n - `preview_audio_url?: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst voiceResponse = await client.voice.retrieve('retell-Cimo');\n\nconsole.log(voiceResponse);\n```",
1819
1819
  perLanguage: {
1820
1820
  http: {
1821
- example: 'curl https://api.retellai.com/get-voice/$VOICE_ID \\\n -H "Authorization: Bearer $API_KEY"',
1821
+ example: 'curl https://api.retellai.com/get-voice/$VOICE_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1822
1822
  },
1823
1823
  python: {
1824
1824
  method: 'voice.retrieve',
1825
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nvoice_response = client.voice.retrieve(\n "retell-Cimo",\n)\nprint(voice_response.provider)',
1825
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_response = client.voice.retrieve(\n "retell-Cimo",\n)\nprint(voice_response.provider)',
1826
1826
  },
1827
1827
  typescript: {
1828
1828
  method: 'client.voice.retrieve',
1829
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst voiceResponse = await client.voice.retrieve('retell-Cimo');\n\nconsole.log(voiceResponse.provider);",
1829
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponse = await client.voice.retrieve('retell-Cimo');\n\nconsole.log(voiceResponse.provider);",
1830
1830
  },
1831
1831
  },
1832
1832
  },
@@ -1842,15 +1842,15 @@ const EMBEDDED_METHODS = [
1842
1842
  markdown: "## list\n\n`client.voice.list(): object[]`\n\n**get** `/list-voices`\n\nList all voices available to the user\n\n### Returns\n\n- `{ gender: 'male' | 'female'; provider: 'elevenlabs' | 'openai' | 'deepgram' | 'cartesia' | 'minimax' | 'fish_audio' | 'platform'; voice_id: string; voice_name: string; accent?: string; age?: string; preview_audio_url?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst voiceResponses = await client.voice.list();\n\nconsole.log(voiceResponses);\n```",
1843
1843
  perLanguage: {
1844
1844
  http: {
1845
- example: 'curl https://api.retellai.com/list-voices \\\n -H "Authorization: Bearer $API_KEY"',
1845
+ example: 'curl https://api.retellai.com/list-voices \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1846
1846
  },
1847
1847
  python: {
1848
1848
  method: 'voice.list',
1849
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nvoice_responses = client.voice.list()\nprint(voice_responses)',
1849
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nvoice_responses = client.voice.list()\nprint(voice_responses)',
1850
1850
  },
1851
1851
  typescript: {
1852
1852
  method: 'client.voice.list',
1853
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst voiceResponses = await client.voice.list();\n\nconsole.log(voiceResponses);",
1853
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst voiceResponses = await client.voice.list();\n\nconsole.log(voiceResponses);",
1854
1854
  },
1855
1855
  },
1856
1856
  },
@@ -1870,15 +1870,15 @@ const EMBEDDED_METHODS = [
1870
1870
  markdown: "## search\n\n`client.voice.search(search_query: string, voice_provider?: 'elevenlabs' | 'cartesia' | 'minimax' | 'fish_audio'): { voices: object[]; }`\n\n**post** `/search-community-voice`\n\nSearch for community voices from voice providers\n\n### Parameters\n\n- `search_query: string`\n Search query to find voices by name, description, or ID.\n\n- `voice_provider?: 'elevenlabs' | 'cartesia' | 'minimax' | 'fish_audio'`\n Voice provider to search.\n\n### Returns\n\n- `{ voices: { description?: string; name?: string; provider_voice_id?: string; public_user_id?: string; }[]; }`\n\n - `voices: { description?: string; name?: string; provider_voice_id?: string; public_user_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst response = await client.voice.search({ search_query: 'search_query' });\n\nconsole.log(response);\n```",
1871
1871
  perLanguage: {
1872
1872
  http: {
1873
- example: 'curl https://api.retellai.com/search-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "search_query": "search_query"\n }\'',
1873
+ example: 'curl https://api.retellai.com/search-community-voice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "search_query": "search_query"\n }\'',
1874
1874
  },
1875
1875
  python: {
1876
1876
  method: 'voice.search',
1877
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nresponse = client.voice.search(\n search_query="search_query",\n)\nprint(response.voices)',
1877
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.voice.search(\n search_query="search_query",\n)\nprint(response.voices)',
1878
1878
  },
1879
1879
  typescript: {
1880
1880
  method: 'client.voice.search',
1881
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst response = await client.voice.search({ search_query: 'search_query' });\n\nconsole.log(response.voices);",
1881
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.voice.search({ search_query: 'search_query' });\n\nconsole.log(response.voices);",
1882
1882
  },
1883
1883
  },
1884
1884
  },
@@ -1894,15 +1894,15 @@ const EMBEDDED_METHODS = [
1894
1894
  markdown: "## retrieve\n\n`client.concurrency.retrieve(): { base_concurrency?: number; concurrency_burst_enabled?: boolean; concurrency_burst_limit?: number; concurrency_limit?: number; concurrency_purchase_limit?: number; current_concurrency?: number; purchased_concurrency?: number; remaining_purchase_limit?: number; }`\n\n**get** `/get-concurrency`\n\nGet the current concurrency and concurrency limit of the org\n\n### Returns\n\n- `{ base_concurrency?: number; concurrency_burst_enabled?: boolean; concurrency_burst_limit?: number; concurrency_limit?: number; concurrency_purchase_limit?: number; current_concurrency?: number; purchased_concurrency?: number; remaining_purchase_limit?: number; }`\n\n - `base_concurrency?: number`\n - `concurrency_burst_enabled?: boolean`\n - `concurrency_burst_limit?: number`\n - `concurrency_limit?: number`\n - `concurrency_purchase_limit?: number`\n - `current_concurrency?: number`\n - `purchased_concurrency?: number`\n - `remaining_purchase_limit?: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst concurrency = await client.concurrency.retrieve();\n\nconsole.log(concurrency);\n```",
1895
1895
  perLanguage: {
1896
1896
  http: {
1897
- example: 'curl https://api.retellai.com/get-concurrency \\\n -H "Authorization: Bearer $API_KEY"',
1897
+ example: 'curl https://api.retellai.com/get-concurrency \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1898
1898
  },
1899
1899
  python: {
1900
1900
  method: 'concurrency.retrieve',
1901
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nconcurrency = client.concurrency.retrieve()\nprint(concurrency.base_concurrency)',
1901
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nconcurrency = client.concurrency.retrieve()\nprint(concurrency.base_concurrency)',
1902
1902
  },
1903
1903
  typescript: {
1904
1904
  method: 'client.concurrency.retrieve',
1905
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst concurrency = await client.concurrency.retrieve();\n\nconsole.log(concurrency.base_concurrency);",
1905
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst concurrency = await client.concurrency.retrieve();\n\nconsole.log(concurrency.base_concurrency);",
1906
1906
  },
1907
1907
  },
1908
1908
  },
@@ -1926,15 +1926,15 @@ const EMBEDDED_METHODS = [
1926
1926
  markdown: "## create-batch-call\n\n`client.batchCall.createBatchCall(from_number: string, tasks: { to_number: string; agent_override?: { agent?: object; conversation_flow?: object; retell_llm?: object; }; custom_sip_headers?: object; ignore_e164_validation?: boolean; metadata?: object; override_agent_id?: string; override_agent_version?: number; retell_llm_dynamic_variables?: object; }[], call_time_window?: { windows: { end: number; start: number; }[]; day?: 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'[]; timezone?: string; }, name?: string, reserved_concurrency?: number, trigger_timestamp?: number): { batch_call_id: string; from_number: string; name: string; scheduled_timestamp: number; total_task_count: number; call_time_window?: object; }`\n\n**post** `/create-batch-call`\n\nCreate a batch call\n\n### Parameters\n\n- `from_number: string`\n The number you own in E.164 format. Must be a number purchased from Retell or imported to Retell.\n\n- `tasks: { to_number: string; agent_override?: { agent?: { agent_name?: string; allow_user_dtmf?: boolean; ambient_sound?: string; ambient_sound_volume?: number; analysis_successful_prompt?: string; analysis_summary_prompt?: string; analysis_user_sentiment_prompt?: string; backchannel_frequency?: number; backchannel_words?: string[]; begin_message_delay_ms?: number; boosted_keywords?: string[]; custom_stt_config?: { endpointing_ms: number; provider: 'azure' | 'deepgram'; }; data_storage_retention_days?: number; data_storage_setting?: 'everything' | 'everything_except_pii' | 'basic_attributes_only'; denoising_mode?: 'no-denoise' | 'noise-cancellation' | 'noise-and-background-speech-cancellation'; enable_backchannel?: boolean; enable_dynamic_responsiveness?: boolean; enable_dynamic_voice_speed?: boolean; end_call_after_silence_ms?: number; fallback_voice_ids?: string[]; guardrail_config?: { input_topics?: 'platform_integrity_jailbreaking'[]; output_topics?: string[]; }; handbook_config?: { ai_disclosure?: boolean; default_personality?: boolean; echo_verification?: boolean; high_empathy?: boolean; nato_phonetic_alphabet?: boolean; natural_filler_words?: boolean; scope_boundaries?: boolean; smart_matching?: boolean; speech_normalization?: boolean; }; interruption_sensitivity?: number; is_public?: boolean; ivr_option?: { action: object; }; language?: string; max_call_duration_ms?: number; normalize_for_speech?: boolean; opt_in_signed_url?: boolean; pii_config?: { categories: string[]; mode: 'post_call'; }; post_call_analysis_data?: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; } | { name: 'call_summary' | 'call_successful' | 'user_sentiment'; type: 'system-presets'; conditional_prompt?: string; description?: string; required?: boolean; }[]; post_call_analysis_model?: string; pronunciation_dictionary?: { alphabet: 'ipa' | 'cmu'; phoneme: string; word: string; }[]; reminder_max_count?: number; reminder_trigger_ms?: number; response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; responsiveness?: number; ring_duration_ms?: number; signed_url_expiration_ms?: number; stt_mode?: 'fast' | 'accurate' | 'custom'; timezone?: string; user_dtmf_options?: { digit_limit?: number; termination_key?: string; timeout_ms?: number; }; version_description?: string; vocab_specialization?: 'general' | 'medical'; voice_emotion?: 'calm' | 'sympathetic' | 'happy' | 'sad' | 'angry' | 'fearful' | 'surprised'; voice_id?: string; voice_model?: string; voice_speed?: number; voice_temperature?: number; voicemail_detection_timeout_ms?: number; voicemail_message?: string; voicemail_option?: { action: object | object | object | object; }; volume?: number; webhook_events?: string[]; webhook_timeout_ms?: number; webhook_url?: string; }; conversation_flow?: { begin_after_user_silence_ms?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; retell_llm?: { begin_after_user_silence_ms?: number; begin_message?: string; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model?: string; model_high_priority?: boolean; model_temperature?: number; s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini'; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; }; }; custom_sip_headers?: object; ignore_e164_validation?: boolean; metadata?: object; override_agent_id?: string; override_agent_version?: number; retell_llm_dynamic_variables?: object; }[]`\n A list of individual call tasks to be executed as part of the batch call. Each task represents a single outbound call and includes details such as the recipient's phone number and optional dynamic variables to personalize the call content.\n\n- `call_time_window?: { windows: { end: number; start: number; }[]; day?: 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'[]; timezone?: string; }`\n Allowed calling windows in a specific timezone. Each window is a half-open interval [startMin, endMin) in minutes since 00:00 local time. Cross-midnight windows are NOT allowed (must satisfy startMin < endMin). `endMin = 1440` (24:00) is valid.\n - `windows: { end: number; start: number; }[]`\n List of TimeWindow (start/end in minutes since local midnight).\n - `day?: 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'[]`\n Optional list of days to which the windows apply. If omitted or empty, windows apply to every day.\n - `timezone?: string`\n IANA timezone (e.g. America/Los_Angeles). Defaults to America/Los_Angeles if omitted.\n\n- `name?: string`\n The name of the batch call. Only used for your own reference.\n\n- `reserved_concurrency?: number`\n Number of concurrency reserved for all other calls that are not triggered by batch calls, such as inbound calls.\n\n- `trigger_timestamp?: number`\n The scheduled time for sending the batch call, represented as a Unix timestamp in milliseconds. If omitted, the call will be sent immediately.\n\n### Returns\n\n- `{ batch_call_id: string; from_number: string; name: string; scheduled_timestamp: number; total_task_count: number; call_time_window?: { windows: { end: number; start: number; }[]; day?: 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'[]; timezone?: string; }; }`\n\n - `batch_call_id: string`\n - `from_number: string`\n - `name: string`\n - `scheduled_timestamp: number`\n - `total_task_count: number`\n - `call_time_window?: { windows: { end: number; start: number; }[]; day?: 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'[]; timezone?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst batchCallResponse = await client.batchCall.createBatchCall({ from_number: '+14157774444', tasks: [{ to_number: '+12137774445' }] });\n\nconsole.log(batchCallResponse);\n```",
1927
1927
  perLanguage: {
1928
1928
  http: {
1929
- example: 'curl https://api.retellai.com/create-batch-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n --max-time 300 \\\n -d \'{\n "from_number": "+14157774444",\n "tasks": [\n {\n "to_number": "+12137774445"\n }\n ],\n "name": "First batch call",\n "trigger_timestamp": 1735718400000\n }\'',
1929
+ example: 'curl https://api.retellai.com/create-batch-call \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "from_number": "+14157774444",\n "tasks": [\n {\n "to_number": "+12137774445"\n }\n ],\n "name": "First batch call",\n "trigger_timestamp": 1735718400000\n }\'',
1930
1930
  },
1931
1931
  python: {
1932
1932
  method: 'batch_call.create_batch_call',
1933
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nbatch_call_response = client.batch_call.create_batch_call(\n from_number="+14157774444",\n tasks=[{\n "to_number": "+12137774445"\n }],\n)\nprint(batch_call_response.batch_call_id)',
1933
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nbatch_call_response = client.batch_call.create_batch_call(\n from_number="+14157774444",\n tasks=[{\n "to_number": "+12137774445"\n }],\n)\nprint(batch_call_response.batch_call_id)',
1934
1934
  },
1935
1935
  typescript: {
1936
1936
  method: 'client.batchCall.createBatchCall',
1937
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst batchCallResponse = await client.batchCall.createBatchCall({\n from_number: '+14157774444',\n tasks: [{ to_number: '+12137774445' }],\n});\n\nconsole.log(batchCallResponse.batch_call_id);",
1937
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst batchCallResponse = await client.batchCall.createBatchCall({\n from_number: '+14157774444',\n tasks: [{ to_number: '+12137774445' }],\n});\n\nconsole.log(batchCallResponse.batch_call_id);",
1938
1938
  },
1939
1939
  },
1940
1940
  },
@@ -1959,15 +1959,15 @@ const EMBEDDED_METHODS = [
1959
1959
  markdown: "## create-test-case-definition\n\n`client.tests.createTestCaseDefinition(metrics: string[], name: string, response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, user_prompt: string, dynamic_variables?: object, llm_model?: string, tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]): { creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: object | object; test_case_definition_id: string; tool_mocks: object[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }`\n\n**post** `/create-test-case-definition`\n\nCreate a new test case definition\n\n### Parameters\n\n- `metrics: string[]`\n Array of metric names to evaluate\n\n- `name: string`\n Name of the test case definition\n\n- `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n Response engine to use for the test case. Custom LLM is not supported.\n\n- `user_prompt: string`\n User prompt to simulate in the test case\n\n- `dynamic_variables?: object`\n Dynamic variables to inject into the response engine\n\n- `llm_model?: string`\n LLM model to use for simulation\n\n- `tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]`\n Mock tool calls for testing\n\n### Returns\n\n- `{ creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; test_case_definition_id: string; tool_mocks: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }`\n\n - `creation_timestamp: number`\n - `dynamic_variables: object`\n - `llm_model: string`\n - `metrics: string[]`\n - `name: string`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `test_case_definition_id: string`\n - `tool_mocks: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]`\n - `type: 'simulation'`\n - `user_modified_timestamp: number`\n - `user_prompt: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst testCaseDefinitionResponse = await client.tests.createTestCaseDefinition({\n metrics: ['string'],\n name: 'name',\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n user_prompt: 'user_prompt',\n});\n\nconsole.log(testCaseDefinitionResponse);\n```",
1960
1960
  perLanguage: {
1961
1961
  http: {
1962
- example: 'curl https://api.retellai.com/create-test-case-definition \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "metrics": [\n "string"\n ],\n "name": "name",\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "user_prompt": "user_prompt"\n }\'',
1962
+ example: 'curl https://api.retellai.com/create-test-case-definition \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "metrics": [\n "string"\n ],\n "name": "name",\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "user_prompt": "user_prompt"\n }\'',
1963
1963
  },
1964
1964
  python: {
1965
1965
  method: 'tests.create_test_case_definition',
1966
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ntest_case_definition_response = client.tests.create_test_case_definition(\n metrics=["string"],\n name="name",\n response_engine={\n "llm_id": "llm_id",\n "type": "retell-llm",\n },\n user_prompt="user_prompt",\n)\nprint(test_case_definition_response.test_case_definition_id)',
1966
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_definition_response = client.tests.create_test_case_definition(\n metrics=["string"],\n name="name",\n response_engine={\n "llm_id": "llm_id",\n "type": "retell-llm",\n },\n user_prompt="user_prompt",\n)\nprint(test_case_definition_response.test_case_definition_id)',
1967
1967
  },
1968
1968
  typescript: {
1969
1969
  method: 'client.tests.createTestCaseDefinition',
1970
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst testCaseDefinitionResponse = await client.tests.createTestCaseDefinition({\n metrics: ['string'],\n name: 'name',\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n user_prompt: 'user_prompt',\n});\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
1970
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseDefinitionResponse = await client.tests.createTestCaseDefinition({\n metrics: ['string'],\n name: 'name',\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n user_prompt: 'user_prompt',\n});\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
1971
1971
  },
1972
1972
  },
1973
1973
  },
@@ -1984,15 +1984,15 @@ const EMBEDDED_METHODS = [
1984
1984
  markdown: "## get-test-case-definition\n\n`client.tests.getTestCaseDefinition(test_case_definition_id: string): { creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: object | object; test_case_definition_id: string; tool_mocks: object[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }`\n\n**get** `/get-test-case-definition/{test_case_definition_id}`\n\nGet a test case definition by ID\n\n### Parameters\n\n- `test_case_definition_id: string`\n\n### Returns\n\n- `{ creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; test_case_definition_id: string; tool_mocks: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }`\n\n - `creation_timestamp: number`\n - `dynamic_variables: object`\n - `llm_model: string`\n - `metrics: string[]`\n - `name: string`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `test_case_definition_id: string`\n - `tool_mocks: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]`\n - `type: 'simulation'`\n - `user_modified_timestamp: number`\n - `user_prompt: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst testCaseDefinitionResponse = await client.tests.getTestCaseDefinition('test_case_definition_id');\n\nconsole.log(testCaseDefinitionResponse);\n```",
1985
1985
  perLanguage: {
1986
1986
  http: {
1987
- example: 'curl https://api.retellai.com/get-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -H "Authorization: Bearer $API_KEY"',
1987
+ example: 'curl https://api.retellai.com/get-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
1988
1988
  },
1989
1989
  python: {
1990
1990
  method: 'tests.get_test_case_definition',
1991
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ntest_case_definition_response = client.tests.get_test_case_definition(\n "test_case_definition_id",\n)\nprint(test_case_definition_response.test_case_definition_id)',
1991
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_definition_response = client.tests.get_test_case_definition(\n "test_case_definition_id",\n)\nprint(test_case_definition_response.test_case_definition_id)',
1992
1992
  },
1993
1993
  typescript: {
1994
1994
  method: 'client.tests.getTestCaseDefinition',
1995
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst testCaseDefinitionResponse = await client.tests.getTestCaseDefinition(\n 'test_case_definition_id',\n);\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
1995
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseDefinitionResponse = await client.tests.getTestCaseDefinition(\n 'test_case_definition_id',\n);\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
1996
1996
  },
1997
1997
  },
1998
1998
  },
@@ -2014,15 +2014,15 @@ const EMBEDDED_METHODS = [
2014
2014
  markdown: "## list-test-case-definitions\n\n`client.tests.listTestCaseDefinitions(type: 'retell-llm' | 'conversation-flow', conversation_flow_id?: string, llm_id?: string, version?: number): object[]`\n\n**get** `/list-test-case-definitions`\n\nList test case definitions for a response engine\n\n### Parameters\n\n- `type: 'retell-llm' | 'conversation-flow'`\n Type of response engine\n\n- `conversation_flow_id?: string`\n Conversation flow ID (required when type is conversation-flow)\n\n- `llm_id?: string`\n LLM ID (required when type is retell-llm)\n\n- `version?: number`\n Version of the response engine (defaults to latest)\n\n### Returns\n\n- `{ creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; test_case_definition_id: string; tool_mocks: { input_match_rule: object | object; output: string; tool_name: string; result?: boolean; }[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst testCaseDefinitionResponses = await client.tests.listTestCaseDefinitions({ type: 'retell-llm' });\n\nconsole.log(testCaseDefinitionResponses);\n```",
2015
2015
  perLanguage: {
2016
2016
  http: {
2017
- example: 'curl https://api.retellai.com/list-test-case-definitions \\\n -H "Authorization: Bearer $API_KEY"',
2017
+ example: 'curl https://api.retellai.com/list-test-case-definitions \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
2018
2018
  },
2019
2019
  python: {
2020
2020
  method: 'tests.list_test_case_definitions',
2021
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ntest_case_definition_responses = client.tests.list_test_case_definitions(\n type="retell-llm",\n)\nprint(test_case_definition_responses)',
2021
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_definition_responses = client.tests.list_test_case_definitions(\n type="retell-llm",\n)\nprint(test_case_definition_responses)',
2022
2022
  },
2023
2023
  typescript: {
2024
2024
  method: 'client.tests.listTestCaseDefinitions',
2025
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst testCaseDefinitionResponses = await client.tests.listTestCaseDefinitions({\n type: 'retell-llm',\n});\n\nconsole.log(testCaseDefinitionResponses);",
2025
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseDefinitionResponses = await client.tests.listTestCaseDefinitions({\n type: 'retell-llm',\n});\n\nconsole.log(testCaseDefinitionResponses);",
2026
2026
  },
2027
2027
  },
2028
2028
  },
@@ -2048,15 +2048,15 @@ const EMBEDDED_METHODS = [
2048
2048
  markdown: "## update-test-case-definition\n\n`client.tests.updateTestCaseDefinition(test_case_definition_id: string, dynamic_variables?: object, llm_model?: string, metrics?: string[], name?: string, response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[], user_prompt?: string): { creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: object | object; test_case_definition_id: string; tool_mocks: object[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }`\n\n**put** `/update-test-case-definition/{test_case_definition_id}`\n\nUpdate a test case definition\n\n### Parameters\n\n- `test_case_definition_id: string`\n\n- `dynamic_variables?: object`\n Dynamic variables to inject into the response engine\n\n- `llm_model?: string`\n LLM model to use for simulation\n\n- `metrics?: string[]`\n Array of metric names to evaluate\n\n- `name?: string`\n Name of the test case definition\n\n- `response_engine?: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n Response engine to use for the test case. Custom LLM is not supported.\n\n- `tool_mocks?: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]`\n Mock tool calls for testing\n\n- `user_prompt?: string`\n User prompt to simulate in the test case\n\n### Returns\n\n- `{ creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; test_case_definition_id: string; tool_mocks: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }`\n\n - `creation_timestamp: number`\n - `dynamic_variables: object`\n - `llm_model: string`\n - `metrics: string[]`\n - `name: string`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `test_case_definition_id: string`\n - `tool_mocks: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]`\n - `type: 'simulation'`\n - `user_modified_timestamp: number`\n - `user_prompt: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst testCaseDefinitionResponse = await client.tests.updateTestCaseDefinition('test_case_definition_id');\n\nconsole.log(testCaseDefinitionResponse);\n```",
2049
2049
  perLanguage: {
2050
2050
  http: {
2051
- example: "curl https://api.retellai.com/update-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $API_KEY\" \\\n -d '{}'",
2051
+ example: "curl https://api.retellai.com/update-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $RETELL_API_KEY\" \\\n -d '{}'",
2052
2052
  },
2053
2053
  python: {
2054
2054
  method: 'tests.update_test_case_definition',
2055
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ntest_case_definition_response = client.tests.update_test_case_definition(\n test_case_definition_id="test_case_definition_id",\n)\nprint(test_case_definition_response.test_case_definition_id)',
2055
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_definition_response = client.tests.update_test_case_definition(\n test_case_definition_id="test_case_definition_id",\n)\nprint(test_case_definition_response.test_case_definition_id)',
2056
2056
  },
2057
2057
  typescript: {
2058
2058
  method: 'client.tests.updateTestCaseDefinition',
2059
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst testCaseDefinitionResponse = await client.tests.updateTestCaseDefinition(\n 'test_case_definition_id',\n);\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
2059
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseDefinitionResponse = await client.tests.updateTestCaseDefinition(\n 'test_case_definition_id',\n);\n\nconsole.log(testCaseDefinitionResponse.test_case_definition_id);",
2060
2060
  },
2061
2061
  },
2062
2062
  },
@@ -2072,15 +2072,15 @@ const EMBEDDED_METHODS = [
2072
2072
  markdown: "## delete-test-case-definition\n\n`client.tests.deleteTestCaseDefinition(test_case_definition_id: string): void`\n\n**delete** `/delete-test-case-definition/{test_case_definition_id}`\n\nDelete a test case definition\n\n### Parameters\n\n- `test_case_definition_id: string`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nawait client.tests.deleteTestCaseDefinition('test_case_definition_id')\n```",
2073
2073
  perLanguage: {
2074
2074
  http: {
2075
- example: 'curl https://api.retellai.com/delete-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $API_KEY"',
2075
+ example: 'curl https://api.retellai.com/delete-test-case-definition/$TEST_CASE_DEFINITION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
2076
2076
  },
2077
2077
  python: {
2078
2078
  method: 'tests.delete_test_case_definition',
2079
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nclient.tests.delete_test_case_definition(\n "test_case_definition_id",\n)',
2079
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nclient.tests.delete_test_case_definition(\n "test_case_definition_id",\n)',
2080
2080
  },
2081
2081
  typescript: {
2082
2082
  method: 'client.tests.deleteTestCaseDefinition',
2083
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nawait client.tests.deleteTestCaseDefinition('test_case_definition_id');",
2083
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.tests.deleteTestCaseDefinition('test_case_definition_id');",
2084
2084
  },
2085
2085
  },
2086
2086
  },
@@ -2100,15 +2100,15 @@ const EMBEDDED_METHODS = [
2100
2100
  markdown: "## create-batch-test\n\n`client.tests.createBatchTest(response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }, test_case_definition_ids: string[]): { creation_timestamp: number; error_count: number; fail_count: number; pass_count: number; response_engine: object | object | object; status: 'in_progress' | 'complete'; test_case_batch_job_id: string; total_count: number; user_modified_timestamp: number; }`\n\n**post** `/create-batch-test`\n\nCreate a batch test to run multiple test cases\n\n### Parameters\n\n- `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n Response engine to use for the test cases. Custom LLM is not supported.\n\n- `test_case_definition_ids: string[]`\n Array of test case definition IDs to run\n\n### Returns\n\n- `{ creation_timestamp: number; error_count: number; fail_count: number; pass_count: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; status: 'in_progress' | 'complete'; test_case_batch_job_id: string; total_count: number; user_modified_timestamp: number; }`\n\n - `creation_timestamp: number`\n - `error_count: number`\n - `fail_count: number`\n - `pass_count: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `status: 'in_progress' | 'complete'`\n - `test_case_batch_job_id: string`\n - `total_count: number`\n - `user_modified_timestamp: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst batchTestResponse = await client.tests.createBatchTest({\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n test_case_definition_ids: ['string'],\n});\n\nconsole.log(batchTestResponse);\n```",
2101
2101
  perLanguage: {
2102
2102
  http: {
2103
- example: 'curl https://api.retellai.com/create-batch-test \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $API_KEY" \\\n -d \'{\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "test_case_definition_ids": [\n "string"\n ]\n }\'',
2103
+ example: 'curl https://api.retellai.com/create-batch-test \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $RETELL_API_KEY" \\\n -d \'{\n "response_engine": {\n "llm_id": "llm_id",\n "type": "retell-llm"\n },\n "test_case_definition_ids": [\n "string"\n ]\n }\'',
2104
2104
  },
2105
2105
  python: {
2106
2106
  method: 'tests.create_batch_test',
2107
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nbatch_test_response = client.tests.create_batch_test(\n response_engine={\n "llm_id": "llm_id",\n "type": "retell-llm",\n },\n test_case_definition_ids=["string"],\n)\nprint(batch_test_response.test_case_batch_job_id)',
2107
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nbatch_test_response = client.tests.create_batch_test(\n response_engine={\n "llm_id": "llm_id",\n "type": "retell-llm",\n },\n test_case_definition_ids=["string"],\n)\nprint(batch_test_response.test_case_batch_job_id)',
2108
2108
  },
2109
2109
  typescript: {
2110
2110
  method: 'client.tests.createBatchTest',
2111
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst batchTestResponse = await client.tests.createBatchTest({\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n test_case_definition_ids: ['string'],\n});\n\nconsole.log(batchTestResponse.test_case_batch_job_id);",
2111
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst batchTestResponse = await client.tests.createBatchTest({\n response_engine: { llm_id: 'llm_id', type: 'retell-llm' },\n test_case_definition_ids: ['string'],\n});\n\nconsole.log(batchTestResponse.test_case_batch_job_id);",
2112
2112
  },
2113
2113
  },
2114
2114
  },
@@ -2125,15 +2125,15 @@ const EMBEDDED_METHODS = [
2125
2125
  markdown: "## get-batch-test\n\n`client.tests.getBatchTest(test_case_batch_job_id: string): { creation_timestamp: number; error_count: number; fail_count: number; pass_count: number; response_engine: object | object | object; status: 'in_progress' | 'complete'; test_case_batch_job_id: string; total_count: number; user_modified_timestamp: number; }`\n\n**get** `/get-batch-test/{test_case_batch_job_id}`\n\nGet a batch test job by ID\n\n### Parameters\n\n- `test_case_batch_job_id: string`\n\n### Returns\n\n- `{ creation_timestamp: number; error_count: number; fail_count: number; pass_count: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; status: 'in_progress' | 'complete'; test_case_batch_job_id: string; total_count: number; user_modified_timestamp: number; }`\n\n - `creation_timestamp: number`\n - `error_count: number`\n - `fail_count: number`\n - `pass_count: number`\n - `response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }`\n - `status: 'in_progress' | 'complete'`\n - `test_case_batch_job_id: string`\n - `total_count: number`\n - `user_modified_timestamp: number`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst batchTestResponse = await client.tests.getBatchTest('test_case_batch_job_id');\n\nconsole.log(batchTestResponse);\n```",
2126
2126
  perLanguage: {
2127
2127
  http: {
2128
- example: 'curl https://api.retellai.com/get-batch-test/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $API_KEY"',
2128
+ example: 'curl https://api.retellai.com/get-batch-test/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
2129
2129
  },
2130
2130
  python: {
2131
2131
  method: 'tests.get_batch_test',
2132
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nbatch_test_response = client.tests.get_batch_test(\n "test_case_batch_job_id",\n)\nprint(batch_test_response.test_case_batch_job_id)',
2132
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nbatch_test_response = client.tests.get_batch_test(\n "test_case_batch_job_id",\n)\nprint(batch_test_response.test_case_batch_job_id)',
2133
2133
  },
2134
2134
  typescript: {
2135
2135
  method: 'client.tests.getBatchTest',
2136
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst batchTestResponse = await client.tests.getBatchTest('test_case_batch_job_id');\n\nconsole.log(batchTestResponse.test_case_batch_job_id);",
2136
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst batchTestResponse = await client.tests.getBatchTest('test_case_batch_job_id');\n\nconsole.log(batchTestResponse.test_case_batch_job_id);",
2137
2137
  },
2138
2138
  },
2139
2139
  },
@@ -2155,15 +2155,15 @@ const EMBEDDED_METHODS = [
2155
2155
  markdown: "## list-batch-tests\n\n`client.tests.listBatchTests(type: 'retell-llm' | 'conversation-flow', conversation_flow_id?: string, llm_id?: string, version?: number): object[]`\n\n**get** `/list-batch-tests`\n\nList batch test jobs for a response engine\n\n### Parameters\n\n- `type: 'retell-llm' | 'conversation-flow'`\n Type of response engine\n\n- `conversation_flow_id?: string`\n Conversation flow ID (required when type is conversation-flow)\n\n- `llm_id?: string`\n LLM ID (required when type is retell-llm)\n\n- `version?: number`\n Version of the response engine (defaults to latest)\n\n### Returns\n\n- `{ creation_timestamp: number; error_count: number; fail_count: number; pass_count: number; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { llm_websocket_url: string; type: 'custom-llm'; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; status: 'in_progress' | 'complete'; test_case_batch_job_id: string; total_count: number; user_modified_timestamp: number; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst batchTestResponses = await client.tests.listBatchTests({ type: 'retell-llm' });\n\nconsole.log(batchTestResponses);\n```",
2156
2156
  perLanguage: {
2157
2157
  http: {
2158
- example: 'curl https://api.retellai.com/list-batch-tests \\\n -H "Authorization: Bearer $API_KEY"',
2158
+ example: 'curl https://api.retellai.com/list-batch-tests \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
2159
2159
  },
2160
2160
  python: {
2161
2161
  method: 'tests.list_batch_tests',
2162
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nbatch_test_responses = client.tests.list_batch_tests(\n type="retell-llm",\n)\nprint(batch_test_responses)',
2162
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nbatch_test_responses = client.tests.list_batch_tests(\n type="retell-llm",\n)\nprint(batch_test_responses)',
2163
2163
  },
2164
2164
  typescript: {
2165
2165
  method: 'client.tests.listBatchTests',
2166
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst batchTestResponses = await client.tests.listBatchTests({ type: 'retell-llm' });\n\nconsole.log(batchTestResponses);",
2166
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst batchTestResponses = await client.tests.listBatchTests({ type: 'retell-llm' });\n\nconsole.log(batchTestResponses);",
2167
2167
  },
2168
2168
  },
2169
2169
  },
@@ -2180,15 +2180,15 @@ const EMBEDDED_METHODS = [
2180
2180
  markdown: "## get-test-run\n\n`client.tests.getTestRun(test_case_job_id: string): { creation_timestamp: number; status: 'in_progress' | 'pass' | 'fail' | 'error'; test_case_definition_id: string; test_case_definition_snapshot: test_case_definition_response; test_case_job_id: string; user_modified_timestamp: number; result_explanation?: string; transcript_snapshot?: object; }`\n\n**get** `/get-test-run/{test_case_job_id}`\n\nGet a test case job (test run) by ID\n\n### Parameters\n\n- `test_case_job_id: string`\n\n### Returns\n\n- `{ creation_timestamp: number; status: 'in_progress' | 'pass' | 'fail' | 'error'; test_case_definition_id: string; test_case_definition_snapshot: { creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: object | object; test_case_definition_id: string; tool_mocks: object[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }; test_case_job_id: string; user_modified_timestamp: number; result_explanation?: string; transcript_snapshot?: object; }`\n\n - `creation_timestamp: number`\n - `status: 'in_progress' | 'pass' | 'fail' | 'error'`\n - `test_case_definition_id: string`\n - `test_case_definition_snapshot: { creation_timestamp: number; dynamic_variables: object; llm_model: string; metrics: string[]; name: string; response_engine: { llm_id: string; type: 'retell-llm'; version?: number; } | { conversation_flow_id: string; type: 'conversation-flow'; version?: number; }; test_case_definition_id: string; tool_mocks: { input_match_rule: { type: 'any'; } | { args: object; type: 'partial_match'; }; output: string; tool_name: string; result?: boolean; }[]; type: 'simulation'; user_modified_timestamp: number; user_prompt: string; }`\n - `test_case_job_id: string`\n - `user_modified_timestamp: number`\n - `result_explanation?: string`\n - `transcript_snapshot?: object`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst testCaseJobResponse = await client.tests.getTestRun('test_case_job_id');\n\nconsole.log(testCaseJobResponse);\n```",
2181
2181
  perLanguage: {
2182
2182
  http: {
2183
- example: 'curl https://api.retellai.com/get-test-run/$TEST_CASE_JOB_ID \\\n -H "Authorization: Bearer $API_KEY"',
2183
+ example: 'curl https://api.retellai.com/get-test-run/$TEST_CASE_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
2184
2184
  },
2185
2185
  python: {
2186
2186
  method: 'tests.get_test_run',
2187
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ntest_case_job_response = client.tests.get_test_run(\n "test_case_job_id",\n)\nprint(test_case_job_response.test_case_definition_id)',
2187
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_job_response = client.tests.get_test_run(\n "test_case_job_id",\n)\nprint(test_case_job_response.test_case_definition_id)',
2188
2188
  },
2189
2189
  typescript: {
2190
2190
  method: 'client.tests.getTestRun',
2191
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst testCaseJobResponse = await client.tests.getTestRun('test_case_job_id');\n\nconsole.log(testCaseJobResponse.test_case_definition_id);",
2191
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseJobResponse = await client.tests.getTestRun('test_case_job_id');\n\nconsole.log(testCaseJobResponse.test_case_definition_id);",
2192
2192
  },
2193
2193
  },
2194
2194
  },
@@ -2205,15 +2205,15 @@ const EMBEDDED_METHODS = [
2205
2205
  markdown: "## list-test-runs\n\n`client.tests.listTestRuns(test_case_batch_job_id: string): object[]`\n\n**get** `/list-test-runs/{test_case_batch_job_id}`\n\nList all test case jobs (test runs) for a batch test job\n\n### Parameters\n\n- `test_case_batch_job_id: string`\n\n### Returns\n\n- `{ creation_timestamp: number; status: 'in_progress' | 'pass' | 'fail' | 'error'; test_case_definition_id: string; test_case_definition_snapshot: object; test_case_job_id: string; user_modified_timestamp: number; result_explanation?: string; transcript_snapshot?: object; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst testCaseJobResponses = await client.tests.listTestRuns('test_case_batch_job_id');\n\nconsole.log(testCaseJobResponses);\n```",
2206
2206
  perLanguage: {
2207
2207
  http: {
2208
- example: 'curl https://api.retellai.com/list-test-runs/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $API_KEY"',
2208
+ example: 'curl https://api.retellai.com/list-test-runs/$TEST_CASE_BATCH_JOB_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
2209
2209
  },
2210
2210
  python: {
2211
2211
  method: 'tests.list_test_runs',
2212
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\ntest_case_job_responses = client.tests.list_test_runs(\n "test_case_batch_job_id",\n)\nprint(test_case_job_responses)',
2212
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\ntest_case_job_responses = client.tests.list_test_runs(\n "test_case_batch_job_id",\n)\nprint(test_case_job_responses)',
2213
2213
  },
2214
2214
  typescript: {
2215
2215
  method: 'client.tests.listTestRuns',
2216
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst testCaseJobResponses = await client.tests.listTestRuns('test_case_batch_job_id');\n\nconsole.log(testCaseJobResponses);",
2216
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst testCaseJobResponses = await client.tests.listTestRuns('test_case_batch_job_id');\n\nconsole.log(testCaseJobResponses);",
2217
2217
  },
2218
2218
  },
2219
2219
  },
@@ -2230,15 +2230,15 @@ const EMBEDDED_METHODS = [
2230
2230
  markdown: "## get-mcp-tools\n\n`client.mcpTool.getMcpTools(agent_id: string, mcp_id: string, component_id?: string, version?: number): object[]`\n\n**get** `/get-mcp-tools/{agent_id}`\n\nGet MCP tools for a specific agent\n\n### Parameters\n\n- `agent_id: string`\n\n- `mcp_id: string`\n The ID of the MCP server to get tools from.\n\n- `component_id?: string`\n The ID of the component if the MCP server is configured under a component.\n\n- `version?: number`\n Optional version of the agent to use for this request. Default to latest version.\n\n### Returns\n\n- `{ description: string; inputSchema: object; name: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst mcpToolDefinitions = await client.mcpTool.getMcpTools('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', { mcp_id: 'mcp-server-1' });\n\nconsole.log(mcpToolDefinitions);\n```",
2231
2231
  perLanguage: {
2232
2232
  http: {
2233
- example: 'curl https://api.retellai.com/get-mcp-tools/$AGENT_ID \\\n -H "Authorization: Bearer $API_KEY"',
2233
+ example: 'curl https://api.retellai.com/get-mcp-tools/$AGENT_ID \\\n -H "Authorization: Bearer $RETELL_API_KEY"',
2234
2234
  },
2235
2235
  python: {
2236
2236
  method: 'mcp_tool.get_mcp_tools',
2237
- example: 'from retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\nmcp_tool_definitions = client.mcp_tool.get_mcp_tools(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n mcp_id="mcp-server-1",\n)\nprint(mcp_tool_definitions)',
2237
+ example: 'import os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\nmcp_tool_definitions = client.mcp_tool.get_mcp_tools(\n agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",\n mcp_id="mcp-server-1",\n)\nprint(mcp_tool_definitions)',
2238
2238
  },
2239
2239
  typescript: {
2240
2240
  method: 'client.mcpTool.getMcpTools',
2241
- example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst mcpToolDefinitions = await client.mcpTool.getMcpTools('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', {\n mcp_id: 'mcp-server-1',\n});\n\nconsole.log(mcpToolDefinitions);",
2241
+ example: "import Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst mcpToolDefinitions = await client.mcpTool.getMcpTools('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', {\n mcp_id: 'mcp-server-1',\n});\n\nconsole.log(mcpToolDefinitions);",
2242
2242
  },
2243
2243
  },
2244
2244
  },
@@ -2246,11 +2246,11 @@ const EMBEDDED_METHODS = [
2246
2246
  const EMBEDDED_READMES = [
2247
2247
  {
2248
2248
  language: 'python',
2249
- content: '# Retell Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/retell-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/retell-sdk/)\n\nThe Retell Python library provides convenient access to the Retell REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install retell-sdk\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nfrom retell import Retell\n\nclient = Retell(\n api_key="YOUR_RETELL_API_KEY",\n)\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(agent_response.agent_id)\n```\n\n\n\n## Async usage\n\nSimply import `AsyncRetell` instead of `Retell` and use `await` with each API call:\n\n```python\nimport asyncio\nfrom retell import AsyncRetell\n\nclient = AsyncRetell(\n api_key="YOUR_RETELL_API_KEY",\n)\n\nasync def main() -> None:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install retell-sdk[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport asyncio\nfrom retell import DefaultAioHttpClient\nfrom retell import AsyncRetell\n\nasync def main() -> None:\n async with AsyncRetell(\n api_key="YOUR_RETELL_API_KEY",\n http_client=DefaultAioHttpClient(),\n) as client:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom retell import Retell\n\nclient = Retell()\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n custom_stt_config={\n "endpointing_ms": 0,\n "provider": "azure",\n },\n)\nprint(agent_response.custom_stt_config)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `retell.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `retell.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `retell.APIError`.\n\n```python\nimport retell\nfrom retell import Retell\n\nclient = Retell()\n\ntry:\n client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\nexcept retell.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept retell.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept retell.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Retell(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `RETELL_LOG` to `info`.\n\n```shell\n$ export RETELL_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom retell import Retell\n\nclient = Retell()\nresponse = client.agent.with_raw_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nagent = response.parse() # get the object that `agent.create()` would have returned\nprint(agent.agent_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.agent.with_streaming_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom retell import Retell, DefaultHttpxClient\n\nclient = Retell(\n # Or use the `RETELL_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom retell import Retell\n\nwith Retell() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-python-sdk/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport retell\nprint(retell.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
2249
+ content: '# Retell Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/retell-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/retell-sdk/)\n\nThe Retell Python library provides convenient access to the Retell REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install retell-sdk\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(agent_response.agent_id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `RETELL_API_KEY="YOUR_RETELL_API_KEY"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncRetell` instead of `Retell` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom retell import AsyncRetell\n\nclient = AsyncRetell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install retell-sdk[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom retell import DefaultAioHttpClient\nfrom retell import AsyncRetell\n\nasync def main() -> None:\n async with AsyncRetell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom retell import Retell\n\nclient = Retell()\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n custom_stt_config={\n "endpointing_ms": 0,\n "provider": "azure",\n },\n)\nprint(agent_response.custom_stt_config)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `retell.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `retell.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `retell.APIError`.\n\n```python\nimport retell\nfrom retell import Retell\n\nclient = Retell()\n\ntry:\n client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\nexcept retell.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept retell.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept retell.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Retell(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `RETELL_LOG` to `info`.\n\n```shell\n$ export RETELL_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom retell import Retell\n\nclient = Retell()\nresponse = client.agent.with_raw_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nagent = response.parse() # get the object that `agent.create()` would have returned\nprint(agent.agent_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.agent.with_streaming_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom retell import Retell, DefaultHttpxClient\n\nclient = Retell(\n # Or use the `RETELL_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom retell import Retell\n\nwith Retell() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-python-sdk/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport retell\nprint(retell.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
2250
2250
  },
2251
2251
  {
2252
2252
  language: 'typescript',
2253
- content: "# Retell TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/retell-sdk.svg?label=npm%20(stable))](https://npmjs.org/package/retell-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/retell-sdk)\n\nThis library provides convenient access to the Retell REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install retell-sdk\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse.agent_id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: 'YOUR_RETELL_API_KEY',\n});\n\nconst params: Retell.AgentCreateParams = {\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n};\nconst agentResponse: Retell.AgentResponse = await client.agent.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst agentResponse = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .catch(async (err) => {\n if (err instanceof Retell.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new Retell({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new Retell({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new Retell();\n\nconst response = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: agentResponse, response: raw } = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(agentResponse.agent_id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `RETELL_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Retell from 'retell-sdk';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Retell({\n logger: logger.child({ name: 'Retell' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.agent.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Retell from 'retell-sdk';\nimport fetch from 'my-fetch';\n\nconst client = new Retell({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Retell({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport Retell from 'npm:retell-sdk';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Retell({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-typescript-sdk/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
2253
+ content: "# Retell TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/retell-sdk.svg?label=npm%20(stable))](https://npmjs.org/package/retell-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/retell-sdk)\n\nThis library provides convenient access to the Retell REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install retell-sdk\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse.agent_id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: Retell.AgentCreateParams = {\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n};\nconst agentResponse: Retell.AgentResponse = await client.agent.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst agentResponse = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .catch(async (err) => {\n if (err instanceof Retell.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new Retell({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new Retell({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new Retell();\n\nconst response = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: agentResponse, response: raw } = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(agentResponse.agent_id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `RETELL_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Retell from 'retell-sdk';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Retell({\n logger: logger.child({ name: 'Retell' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.agent.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Retell from 'retell-sdk';\nimport fetch from 'my-fetch';\n\nconst client = new Retell({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Retell({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport Retell from 'npm:retell-sdk';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Retell({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-typescript-sdk/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
2254
2254
  },
2255
2255
  ];
2256
2256
  const INDEX_OPTIONS = {