JavaScript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const llms = await client.llm.list();
console.log(llms.has_more);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
llms = client.llm.list()
print(llms.has_more)curl --request GET \
--url https://api.retellai.com/v2/list-retell-llms \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/v2/list-retell-llms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.retellai.com/v2/list-retell-llms"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.retellai.com/v2/list-retell-llms")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/v2/list-retell-llms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pagination_key": "<string>",
"has_more": true,
"items": [
{
"llm_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"last_modification_timestamp": 1703413636133,
"version": 0,
"is_published": false,
"model": "gpt-4.1",
"s2s_model": "gpt-realtime-1.5",
"model_temperature": 0,
"model_high_priority": true,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"<string>"
],
"kb_config": {
"top_k": 3,
"filter_score": 0.6
},
"begin_after_user_silence_ms": 2000,
"begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",
"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.",
"transfer_destination": {
"type": "predefined",
"number": "16175551212",
"ignore_e164_validation": false
},
"transfer_option": {
"type": "cold_transfer",
"show_transferee_as_caller": false
}
}
]
},
{
"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",
"default_dynamic_variables": {
"customer_name": "John Doe"
},
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {
"Authorization": "Bearer 1234567890"
},
"query_params": {
"index": "1",
"key": "value"
},
"timeout_ms": 123
}
]
}
]
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "Forbidden"
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Retell LLM Response Engine (for single / multi prompt agent)
List Retell LLMs
List Retell LLM Response Engines with pagination
GET
/
v2
/
list-retell-llms
JavaScript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const llms = await client.llm.list();
console.log(llms.has_more);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
llms = client.llm.list()
print(llms.has_more)curl --request GET \
--url https://api.retellai.com/v2/list-retell-llms \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/v2/list-retell-llms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.retellai.com/v2/list-retell-llms"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.retellai.com/v2/list-retell-llms")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/v2/list-retell-llms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pagination_key": "<string>",
"has_more": true,
"items": [
{
"llm_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"last_modification_timestamp": 1703413636133,
"version": 0,
"is_published": false,
"model": "gpt-4.1",
"s2s_model": "gpt-realtime-1.5",
"model_temperature": 0,
"model_high_priority": true,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"<string>"
],
"kb_config": {
"top_k": 3,
"filter_score": 0.6
},
"begin_after_user_silence_ms": 2000,
"begin_message": "Hey I am a virtual assistant calling from Retell Hospital.",
"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.",
"transfer_destination": {
"type": "predefined",
"number": "16175551212",
"ignore_e164_validation": false
},
"transfer_option": {
"type": "cold_transfer",
"show_transferee_as_caller": false
}
}
]
},
{
"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",
"default_dynamic_variables": {
"customer_name": "John Doe"
},
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {
"Authorization": "Bearer 1234567890"
},
"query_params": {
"index": "1",
"key": "value"
},
"timeout_ms": 123
}
]
}
]
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "Forbidden"
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Query Parameters
Maximum number of items to return.
Required range:
x <= 1000Sort order for results.
Available options:
ascending, descending Pagination key for fetching the next page.
Was this page helpful?
⌘I

