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.list();
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"
}
}
}
],
"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": "deepfilternet",
"noise_suppression_config": {
"attenuation_limit": 100,
"mode": "advanced"
},
"time_limit_secs": 1800
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>"
},
"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>"
}
}
]
}Retrieve a list of all AI Assistants configured by the user.
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.list();
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"
}
}
}
],
"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": "deepfilternet",
"noise_suppression_config": {
"attenuation_limit": 100,
"mode": "advanced"
},
"time_limit_secs": 1800
},
"messaging_settings": {
"default_messaging_profile_id": "<string>",
"delivery_status_webhook_url": "<string>"
},
"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>"
}
}
]
}Was this page helpful?