Join us Jan 27 in SF for the Low Latency Club: Voice AI Observability Meetup! Learn more
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const assistantsList = await client.ai.assistants.imports({
api_key_ref: 'api_key_ref',
provider: 'elevenlabs',
});
console.log(assistantsList.data);{
"data": [
{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"instructions": "<string>",
"description": "<string>",
"tools": [
{
"type": "webhook",
"webhook": {
"name": "<string>",
"description": "<string>",
"url": "https://example.com/api/v1/function",
"method": "POST",
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_parameters": {
"properties": {
"age": {
"description": "The age of the customer.",
"type": "integer"
},
"location": {
"description": "The location of the customer.",
"type": "string"
}
},
"required": [
"age",
"location"
],
"type": "object"
},
"path_parameters": {
"properties": {
"id": {
"description": "The id of the customer.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"query_parameters": {
"properties": {
"page": {
"description": "The page number.",
"type": "integer"
}
},
"required": [
"page"
],
"type": "object"
},
"async": false,
"timeout_ms": 5250
}
}
],
"greeting": "<string>",
"llm_api_key_ref": "<string>",
"voice_settings": {
"voice": "<string>",
"voice_speed": 1,
"api_key_ref": "<string>",
"temperature": 0.5,
"similarity_boost": 0.75,
"use_speaker_boost": true,
"style": 0,
"speed": 1,
"background_audio": {
"type": "predefined_media",
"value": "silence"
}
},
"transcription": {
"model": "deepgram/flux",
"language": "<string>",
"region": "<string>",
"settings": {
"smart_format": true,
"numerals": true,
"eot_threshold": 123,
"eot_timeout_ms": 123,
"eager_eot_threshold": 0.3
}
},
"telephony_settings": {
"default_texml_app_id": "<string>",
"supports_unauthenticated_web_calls": true,
"noise_suppression": "krisp",
"noise_suppression_config": {
"attenuation_limit": 100,
"mode": "advanced"
},
"time_limit_secs": 1800,
"user_idle_timeout_secs": 7215,
"voicemail_detection": {
"on_voicemail_detected": {
"action": "stop_assistant",
"voicemail_message": {
"type": "prompt",
"prompt": "<string>",
"message": "<string>"
}
}
}
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>",
"conversation_inactivity_minutes": 5000000
},
"enabled_features": [
"telephony"
],
"insight_settings": {
"insight_group_id": "<string>"
},
"privacy_settings": {
"data_retention": true
},
"dynamic_variables_webhook_url": "<string>",
"dynamic_variables": {},
"import_metadata": {
"import_provider": "elevenlabs",
"import_id": "<string>"
},
"widget_settings": {
"theme": "light",
"audio_visualizer_config": {
"color": "verdant",
"preset": "<string>"
},
"start_call_text": "<string>",
"default_state": "expanded",
"position": "fixed",
"view_history_url": "<string>",
"report_issue_url": "<string>",
"give_feedback_url": "<string>",
"agent_thinking_text": "<string>",
"speak_to_interrupt_text": "<string>",
"logo_icon_url": "<string>"
}
}
]
}Import assistants from external providers. Any assistant that has already been imported will be overwritten with its latest version from the importing provider.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const assistantsList = await client.ai.assistants.imports({
api_key_ref: 'api_key_ref',
provider: 'elevenlabs',
});
console.log(assistantsList.data);{
"data": [
{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"instructions": "<string>",
"description": "<string>",
"tools": [
{
"type": "webhook",
"webhook": {
"name": "<string>",
"description": "<string>",
"url": "https://example.com/api/v1/function",
"method": "POST",
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_parameters": {
"properties": {
"age": {
"description": "The age of the customer.",
"type": "integer"
},
"location": {
"description": "The location of the customer.",
"type": "string"
}
},
"required": [
"age",
"location"
],
"type": "object"
},
"path_parameters": {
"properties": {
"id": {
"description": "The id of the customer.",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"query_parameters": {
"properties": {
"page": {
"description": "The page number.",
"type": "integer"
}
},
"required": [
"page"
],
"type": "object"
},
"async": false,
"timeout_ms": 5250
}
}
],
"greeting": "<string>",
"llm_api_key_ref": "<string>",
"voice_settings": {
"voice": "<string>",
"voice_speed": 1,
"api_key_ref": "<string>",
"temperature": 0.5,
"similarity_boost": 0.75,
"use_speaker_boost": true,
"style": 0,
"speed": 1,
"background_audio": {
"type": "predefined_media",
"value": "silence"
}
},
"transcription": {
"model": "deepgram/flux",
"language": "<string>",
"region": "<string>",
"settings": {
"smart_format": true,
"numerals": true,
"eot_threshold": 123,
"eot_timeout_ms": 123,
"eager_eot_threshold": 0.3
}
},
"telephony_settings": {
"default_texml_app_id": "<string>",
"supports_unauthenticated_web_calls": true,
"noise_suppression": "krisp",
"noise_suppression_config": {
"attenuation_limit": 100,
"mode": "advanced"
},
"time_limit_secs": 1800,
"user_idle_timeout_secs": 7215,
"voicemail_detection": {
"on_voicemail_detected": {
"action": "stop_assistant",
"voicemail_message": {
"type": "prompt",
"prompt": "<string>",
"message": "<string>"
}
}
}
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>",
"conversation_inactivity_minutes": 5000000
},
"enabled_features": [
"telephony"
],
"insight_settings": {
"insight_group_id": "<string>"
},
"privacy_settings": {
"data_retention": true
},
"dynamic_variables_webhook_url": "<string>",
"dynamic_variables": {},
"import_metadata": {
"import_provider": "elevenlabs",
"import_id": "<string>"
},
"widget_settings": {
"theme": "light",
"audio_visualizer_config": {
"color": "verdant",
"preset": "<string>"
},
"start_call_text": "<string>",
"default_state": "expanded",
"position": "fixed",
"view_history_url": "<string>",
"report_issue_url": "<string>",
"give_feedback_url": "<string>",
"agent_thinking_text": "<string>",
"speak_to_interrupt_text": "<string>",
"logo_icon_url": "<string>"
}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The external provider to import assistants from.
elevenlabs, vapi, retell Integration secret pointer that refers to the API key for the external provider. This should be an identifier for an integration secret created via /v2/integration_secrets.
Optional list of assistant IDs to import from the external provider. If not provided, all assistants will be imported.
Successful Response
Show child attributes
Was this page helpful?