GET
/
get-retell-llm
/
{llm_id}
curl --request GET \
  --url https://api.retellai.com/get-retell-llm/{llm_id} \
  --header 'Authorization: Bearer <token>'
{
  "llm_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "llm_websocket_url": "wss://api.retellai.com/retell-llm/llm-websocket/oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "model": "gpt-3.5-turbo",
  "general_prompt": "You are ...",
  "general_tools": [
    {
      "type": "end_call",
      "name": "end_call",
      "description": "End the call with user."
    }
  ],
  "states": [
    {
      "name": "information_collection",
      "state_prompt": "You will follow the steps below to collect information...",
      "edges": [
        {
          "destination_state_name": "appointment_booking",
          "description": "Transition to book an appointment."
        }
      ],
      "tools": [
        {
          "type": "transfer_call",
          "name": "transfer_to_support",
          "description": "Transfer to the support team.",
          "number": "16175551212"
        }
      ]
    },
    {
      "name": "appointment_booking",
      "state_prompt": "You will follow the steps below to book an appointment...",
      "tools": [
        {
          "type": "book_appointment_cal",
          "name": "book_appointment",
          "description": "Book an annual check up.",
          "cal_api_key": "cal_live_xxxxxxxxxxxx",
          "event_type_id": 60444,
          "timezone": "America/Los_Angeles"
        }
      ]
    }
  ],
  "starting_state": "information_collection",
  "begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",
  "inbound_dynamic_variables_webhook_url": "https://webhook-url-here",
  "last_modification_timestamp": 1703413636133
}

Authorizations

Authorization
string
headerrequired

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Path Parameters

llm_id
string
required

Unique id of the Retell LLM to be retrieved.

Response

200 - application/json
llm_id
string
required

Unique id of Retell LLM.

llm_websocket_url
string
required

The LLM Websocket URL constructed from unique id of Retell LLM. Used in agent API to create / update agent.

model
enum<string>

Select the underlying LLM. If not set, would default to gpt-3.5-turbo.

Available options:
gpt-3.5-turbo,
gpt-4-turbo,
gpt-4o,
claude-3.5-sonnet,
claude-3-haiku
general_prompt
string | null

General prompt appended to system prompt no matter what state the agent is in.

  • System prompt (with state) = general prompt + state prompt.

  • System prompt (no state) = general prompt.

general_tools
object[] | null

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 (last option) for the LLM to use.

  • Tools of LLM (with state) = general tools + state tools + state transitions

  • Tools of LLM (no state) = general tools

states
object[] | null

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).

starting_state
string | null

Name of the starting state. Required if states is not empty.

begin_message
string | null

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.

inbound_dynamic_variables_webhook_url
string | null

For inbound phone calls with Retell numbers, if this webhook is set, will POST to it to retrieve dynamic variables to use for the call. Without this, there's no way to pass dynamic variables to inbound calls of Retell numbers.

last_modification_timestamp
integer
required

Last modification timestamp (milliseconds since epoch). Either the time of last update or creation if no updates available.