List Guardrails
curl --request GET \
--url https://tavusapi.com/v2/guardrails \
--header 'x-api-key: <api-key>'import requests
url = "https://tavusapi.com/v2/guardrails"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://tavusapi.com/v2/guardrails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tavusapi.com/v2/guardrails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://tavusapi.com/v2/guardrails"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://tavusapi.com/v2/guardrails")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/guardrails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"uuid": "g1234567890ab",
"guardrail_name": "healthcare_compliance_guardrail",
"guardrail_prompt": "Never share sensitive medical information or provide medical advice outside approved guidelines.",
"modality": "verbal",
"callback_url": "https://your-server.com/guardrails-webhook",
"tags": [
"compliance",
"healthcare"
],
"app_message": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total_count": 15,
"page": 0,
"limit": 10
}{
"message": "Invalid access token"
}Guardrails
List Guardrails
Return a flat list of guardrails owned by the caller. Pass legacy=false - recommended for all new integrations. The legacy=true behavior returns the deprecated guardrail set list.
GET
/
v2
/
guardrails
List Guardrails
curl --request GET \
--url https://tavusapi.com/v2/guardrails \
--header 'x-api-key: <api-key>'import requests
url = "https://tavusapi.com/v2/guardrails"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://tavusapi.com/v2/guardrails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tavusapi.com/v2/guardrails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://tavusapi.com/v2/guardrails"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://tavusapi.com/v2/guardrails")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/guardrails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"uuid": "g1234567890ab",
"guardrail_name": "healthcare_compliance_guardrail",
"guardrail_prompt": "Never share sensitive medical information or provide medical advice outside approved guidelines.",
"modality": "verbal",
"callback_url": "https://your-server.com/guardrails-webhook",
"tags": [
"compliance",
"healthcare"
],
"app_message": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total_count": 15,
"page": 0,
"limit": 10
}{
"message": "Invalid access token"
}For AI agents, use
https://docs.tavus.io/openapi.yaml for the full HTTP API contract.Authorizations
Query Parameters
Pass false to return individual guardrails (recommended). Defaults to true for backwards compatibility, which returns the deprecated guardrail set list.
Available options:
true, false Number of guardrails to return per page. Default is 10.
Page number (0-indexed when legacy=false). Default is 0.
Sort direction. Default is ascending.
Available options:
ascending, descending Filter results by guardrail name or UUID.
Comma-separated list of tags to filter by. Any-match (OR) semantics.

