Skip to main content
GET
/
ai
/
assistants
/
{assistant_id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const inferenceEmbedding = await client.ai.assistants.retrieve('assistant_id');

console.log(inferenceEmbedding.id);
{
  "id": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "model": "<string>",
  "instructions": "<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>",
    "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
    }
  },
  "telephony_settings": {
    "default_texml_app_id": "<string>",
    "supports_unauthenticated_web_calls": true
  },
  "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>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

assistant_id
string
required

Query Parameters

fetch_dynamic_variables_from_webhook
boolean
default:false
from
string
to
string
call_control_id
string

Response

Successful Response

id
string
required
name
string
required
created_at
string<date-time>
required
model
string
required

ID of the model to use. You can use the Get models API to see all of your available models,

instructions
string
required

System instructions for the assistant. These may be templated with dynamic variables

description
string
tools
(WebhookTool · object | RetrievalTool · object | HandoffTool · object | HangupTool · object | TransferTool · object | SIPReferTool · object | DTMFTool · object)[]

The tools that the assistant can use. These may be templated with dynamic variables

  • WebhookTool
  • RetrievalTool
  • HandoffTool
  • HangupTool
  • TransferTool
  • SIPReferTool
  • DTMFTool
greeting
string

Text that the assistant will use to start the conversation. This may be templated with dynamic variables

llm_api_key_ref
string

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
transcription
object
telephony_settings
object
messaging_settings
object
enabled_features
enum<string>[]
insight_settings
object
privacy_settings
object
dynamic_variables_webhook_url
string

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.

dynamic_variables
object

Map of dynamic variables and their values

import_metadata
object