Guardrails
List Preset Templates
Read-only blueprints the dashboard offers in the Guardrails empty state.
GET
/
api
/
v1
/
guardrail-policies
/
presets
List Preset Templates
curl --request GET \
--url https://api.example.com/api/v1/guardrail-policies/presetsimport requests
url = "https://api.example.com/api/v1/guardrail-policies/presets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/guardrail-policies/presets', 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://api.example.com/api/v1/guardrail-policies/presets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/guardrail-policies/presets"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/guardrail-policies/presets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/guardrail-policies/presets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns the four hand-curated preset templates:
pii-safe, strict-json, cost-conscious, and enterprise-default. Presets are read-only — applying one is a normal create policy call seeded with the preset’s rules array.
Per the strict opt-in contract, fetching or applying a preset never auto-binds it to an API key.
Authentication
Requires a Bearer token with thebilling API key scope.
Request Examples
curl https://www.hitheo.ai/api/v1/guardrail-policies/presets \
-H "Authorization: Bearer $THEO_API_KEY"
const presets = await theo.guardrails.presets.list();
const enterprise = presets.find((p) => p.id === "enterprise-default")!;
const policy = await theo.guardrails.policies.create({
name: "Production defaults",
rules: enterprise.rules,
});
Response
Each preset includesid, name, tagline, description, and rules. The four shipping presets are:
- pii-safe — PII redaction on input.
- strict-json — Prompt-injection deny + JSON repair on output.
- cost-conscious — Hard length cap on both phases (~4K tokens).
- enterprise-default — Full stack: PII redaction + injection deny + length cap + profanity flag + JSON repair.
{
"presets": [
{
"id": "pii-safe",
"name": "PII-safe",
"tagline": "Redact email / phone / SSN / credit-card / DL before the model sees them.",
"description": "Sensible default for compliance-sensitive teams. ...",
"rules": [
{
"guardrail_id": "pii_redactor",
"phase": "input",
"verdict": "redact",
"config": {},
"enabled": true,
"rule_order": 0
}
]
}
]
}
Was this page helpful?
List Preset Templates
curl --request GET \
--url https://api.example.com/api/v1/guardrail-policies/presetsimport requests
url = "https://api.example.com/api/v1/guardrail-policies/presets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/guardrail-policies/presets', 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://api.example.com/api/v1/guardrail-policies/presets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/guardrail-policies/presets"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/guardrail-policies/presets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/guardrail-policies/presets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body