Get Eval Agent Template
curl --request GET \
--url https://api.bland.ai/v1/evals/agent-templates/{template_key} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/evals/agent-templates/{template_key}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/evals/agent-templates/{template_key}', 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.bland.ai/v1/evals/agent-templates/{template_key}",
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: <authorization>"
],
]);
$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.bland.ai/v1/evals/agent-templates/{template_key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v1/evals/agent-templates/{template_key}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agent-templates/{template_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"key": "hallucination_detection",
"name": "Hallucination Detection",
"description": "Detects factual inaccuracies or fabricated information in agent responses.",
"category": "quality",
"modality": "text",
"system_prompt_md": "You are an expert evaluator assessing whether an AI agent fabricated information.",
"prompt_md": "Review the conversation and determine whether the agent stated anything that was factually incorrect or unsupported.",
"levels": [
{
"level_key": "no_hallucination",
"label": "No Hallucination",
"prompt_md": "The agent made no factually incorrect or unsupported claims.",
"color": "emerald"
},
{
"level_key": "minor_hallucination",
"label": "Minor Hallucination",
"prompt_md": "The agent made one or more small inaccuracies that did not materially mislead the user.",
"color": "amber"
},
{
"level_key": "major_hallucination",
"label": "Major Hallucination",
"prompt_md": "The agent stated clearly false or fabricated information that could mislead the user.",
"color": "rose"
}
],
"target_level_keys": ["no_hallucination"]
},
"errors": null
}
Templates
Get Eval Agent Template
Fetch a single shipped eval agent template by its key.
GET
/
v1
/
evals
/
agent-templates
/
{template_key}
Get Eval Agent Template
curl --request GET \
--url https://api.bland.ai/v1/evals/agent-templates/{template_key} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/evals/agent-templates/{template_key}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/evals/agent-templates/{template_key}', 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.bland.ai/v1/evals/agent-templates/{template_key}",
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: <authorization>"
],
]);
$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.bland.ai/v1/evals/agent-templates/{template_key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v1/evals/agent-templates/{template_key}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agent-templates/{template_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"key": "hallucination_detection",
"name": "Hallucination Detection",
"description": "Detects factual inaccuracies or fabricated information in agent responses.",
"category": "quality",
"modality": "text",
"system_prompt_md": "You are an expert evaluator assessing whether an AI agent fabricated information.",
"prompt_md": "Review the conversation and determine whether the agent stated anything that was factually incorrect or unsupported.",
"levels": [
{
"level_key": "no_hallucination",
"label": "No Hallucination",
"prompt_md": "The agent made no factually incorrect or unsupported claims.",
"color": "emerald"
},
{
"level_key": "minor_hallucination",
"label": "Minor Hallucination",
"prompt_md": "The agent made one or more small inaccuracies that did not materially mislead the user.",
"color": "amber"
},
{
"level_key": "major_hallucination",
"label": "Major Hallucination",
"prompt_md": "The agent stated clearly false or fabricated information that could mislead the user.",
"color": "rose"
}
],
"target_level_keys": ["no_hallucination"]
},
"errors": null
}
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The template’s key, for example
hallucination_detection.Response
string
Unique identifier key for the template.
string
Human-readable display name.
string
Brief description of what the template evaluates.
string
Template category. One of
voice, sales, support, scheduling, compliance, or quality.string
Evaluation modality. Either
text or audio.string
The system prompt used for this eval agent, in Markdown.
string
The evaluation prompt, in Markdown.
array
Ordered scoring levels for this template.
array
Array of
level_key strings that represent the passing threshold for this template.404 with code EVAL_AGENT_TEMPLATE_NOT_FOUND if the key does not match any shipped template.
{
"data": {
"key": "hallucination_detection",
"name": "Hallucination Detection",
"description": "Detects factual inaccuracies or fabricated information in agent responses.",
"category": "quality",
"modality": "text",
"system_prompt_md": "You are an expert evaluator assessing whether an AI agent fabricated information.",
"prompt_md": "Review the conversation and determine whether the agent stated anything that was factually incorrect or unsupported.",
"levels": [
{
"level_key": "no_hallucination",
"label": "No Hallucination",
"prompt_md": "The agent made no factually incorrect or unsupported claims.",
"color": "emerald"
},
{
"level_key": "minor_hallucination",
"label": "Minor Hallucination",
"prompt_md": "The agent made one or more small inaccuracies that did not materially mislead the user.",
"color": "amber"
},
{
"level_key": "major_hallucination",
"label": "Major Hallucination",
"prompt_md": "The agent stated clearly false or fabricated information that could mislead the user.",
"color": "rose"
}
],
"target_level_keys": ["no_hallucination"]
},
"errors": null
}
Docs for agents: llms.txt
Was this page helpful?
⌘I