List assistants
GET/ai/assistants
Retrieve a list of all AI Assistants configured by the user.
Responses
200: Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- BookAppointmentTool
- CheckAvailabilityTool
- WebhookTool
- HangupTool
- TransferTool
- RetrievalTool
Array [
]
Array [
]
]
distil-whisper/distil-large-v2
is lower latency but English-only.openai/whisper-large-v3-turbo
is multi-lingual with automatic language detection but slightly higher latency.]
data
object[]
required
ID of the model to use. You can use the Get models API to see all of your available models,
System instructions for the assistant. These may be templated with dynamic variables
tools
object[]
The tools that the assistant can use. These may be templated with dynamic variables
oneOf
Possible values: [book_appointment
]
book_appointment
object
required
Event Type ID for which slots are being fetched. cal.com
Reference to an integration secret that contains your Cal.com API key. You would pass the identifier
for an integration secret /v2/integration_secrets that refers to your Cal.com API key.
The name of the attendee cal.com. If not provided, the assistant will ask for the attendee's name.
The timezone of the attendee cal.com. If not provided, the assistant will ask for the attendee's timezone.
Possible values: [check_availability
]
check_availability
object
required
Event Type ID for which slots are being fetched. cal.com
Reference to an integration secret that contains your Cal.com API key. You would pass the identifier
for an integration secret /v2/integration_secrets that refers to your Cal.com API key.
Possible values: [webhook
]
webhook
object
required
The name of the tool.
The description of the tool.
The URL of the external tool to be called. This URL is going to be used by the assistant. The URL can be templated like: https://example.com/api/v1/{id}
, where {id}
is a placeholder for a value that will be provided by the assistant if path_parameters
are provided with the id
attribute.
Possible values: [GET
, POST
, PUT
, DELETE
, PATCH
]
Default value: POST
The HTTP method to be used when calling the external tool.
headers
object[]
The headers to be sent to the external tool.
The value of the header. Note that we support mustache templating for the value. For example you can use Bearer {{#integration_secret}}test-secret{{/integration_secret}}
to pass the value of the integration secret as the bearer token.
The headers to be sent to the external tool.
body_parameters
object
The body parameters the webhook tool accepts, described as a JSON Schema object. These parameters will be passed to the webhook as the body of the request. See the JSON Schema reference for documentation about the format
The properties of the body parameters.
The required properties of the body parameters.
Possible values: [object
]
path_parameters
object
The path parameters the webhook tool accepts, described as a JSON Schema object. These parameters will be passed to the webhook as the path of the request if the URL contains a placeholder for a value. See the JSON Schema reference for documentation about the format
The properties of the path parameters.
The required properties of the path parameters.
Possible values: [object
]
query_parameters
object
The query parameters the webhook tool accepts, described as a JSON Schema object. These parameters will be passed to the webhook as the query of the request. See the JSON Schema reference for documentation about the format
The properties of the query parameters.
The required properties of the query parameters.
Possible values: [object
]
Possible values: [hangup
]
hangup
object
required
Default value: This tool is used to hang up the call.
The description of the function that will be passed to the assistant.
Possible values: [transfer
]
transfer
object
required
targets
object[]
required
The different possible targets of the transfer. The assistant will be able to choose one of the targets to transfer the call to.
The name of the target.
The destination number or SIP URI of the call.
The different possible targets of the transfer. The assistant will be able to choose one of the targets to transfer the call to.
Number or SIP URI placing the call.
Possible values: [retrieval
]
retrieval
object
required
List of embedded storage buckets to use for retrieval-augmented generation.
The maximum number of results to retrieve as context for the language model.
Text that the assistant will use to start the conversation. This may be templated with dynamic variables
This is only needed when using third-party inference providers. The identifier
for an integration secret /v2/integration_secrets that refers to your LLM provider's API key. Warning: Free plans are unlikely to work with this integration.
voice_settings
object
The voice to be used by the voice assistant. Check the full list of available voices via our voices API.
To use ElevenLabs, you must reference your ElevenLabs API key as an integration secret under the api_key_ref
field. See integration secrets documentation for details. For Telnyx voices, use Telnyx.<model_id>.<voice_id>
(e.g. Telnyx.KokoroTTS.af_heart)
The identifier
for an integration secret /v2/integration_secrets that refers to your ElevenLabs API key. Warning: Free plans are unlikely to work with this integration.
transcription
object
The speech to text model to be used by the voice assistant.
telephony_settings
object
Default Texml App used for voice calls with your assistant. This will be created automatically on assistant creation.
messaging_settings
object
Default Messaging Profile used for messaging exchanges with your assistant. This will be created automatically on assistant creation.
The URL where webhooks related to delivery statused for assistant messages will be sent.
Possible values: [telephony
, messaging
]
insight_settings
object
Reference to an Insight Group. Insights in this group will be run automatically for all the assistant's conversations.
If the dynamic_variables_webhook_url is set for the assistant, we will send a request at the start of the conversation. See our guide for more information.
Map of dynamic variables and their values
{
"data": [
{
"id": "string",
"name": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"description": "string",
"model": "string",
"instructions": "string",
"tools": [
{},
{},
{},
{},
{},
{}
],
"greeting": "string",
"llm_api_key_ref": "string",
"voice_settings": {
"voice": "string",
"api_key_ref": "string"
},
"transcription": {
"model": "string"
},
"telephony_settings": {
"default_texml_app_id": "string"
},
"messaging_settings": {
"default_messaging_profile_id": "string",
"delivery_status_webhook_url": "string"
},
"enabled_features": [
"telephony"
],
"insight_settings": {
"insight_group_id": "string"
},
"dynamic_variables_webhook_url": "string",
"dynamic_variables": {}
}
]
}
422: Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
Request samples
- cURL
curl -L 'https://api.telnyx.com/v2/ai/assistants' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
- 200
- 422
{
"data": [
{
"id": "string",
"name": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"description": "string",
"model": "string",
"instructions": "string",
"tools": [
{},
{},
{},
{},
{},
{}
],
"greeting": "string",
"llm_api_key_ref": "string",
"voice_settings": {
"voice": "string",
"api_key_ref": "string"
},
"transcription": {
"model": "string"
},
"telephony_settings": {
"default_texml_app_id": "string"
},
"messaging_settings": {
"default_messaging_profile_id": "string",
"delivery_status_webhook_url": "string"
},
"enabled_features": [
"telephony"
],
"insight_settings": {
"insight_group_id": "string"
},
"dynamic_variables_webhook_url": "string",
"dynamic_variables": {}
}
]
}
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}