Eval Agents
Create Eval Agent
Create a new eval agent, optionally seeded from a template.
POST
/
v1
/
evals
/
agents
Create Eval Agent
curl --request POST \
--url https://api.bland.ai/v1/evals/agents \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": {},
"template_key": {},
"user_template_id": {},
"modality": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/evals/agents"
payload = {
"name": "<string>",
"description": {},
"template_key": {},
"user_template_id": {},
"modality": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: {},
template_key: {},
user_template_id: {},
modality: '<string>'
})
};
fetch('https://api.bland.ai/v1/evals/agents', 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/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => [
],
'template_key' => [
],
'user_template_id' => [
],
'modality' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/evals/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": {},\n \"template_key\": {},\n \"user_template_id\": {},\n \"modality\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/evals/agents")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": {},\n \"template_key\": {},\n \"user_template_id\": {},\n \"modality\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": {},\n \"template_key\": {},\n \"user_template_id\": {},\n \"modality\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errors": null,
"data": {
"agent": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"key": "empathy-check",
"name": "Empathy Check",
"description": "Grades how empathetic the agent sounds during difficult conversations.",
"current_version_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"active_version_id": null,
"metadata": {},
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T10:00:00.000Z",
"deleted_at": null
},
"current_version": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 1,
"name": "Empathy Check v1",
"description": null,
"state": "editable",
"modality": "audio",
"system_prompt_md": "You are an expert call quality reviewer.",
"prompt_md": "Did the agent express empathy when the caller described their problem?",
"levels": [
{
"level_key": "excellent",
"label": "Excellent",
"prompt_md": "The agent clearly and warmly acknowledged the caller's feelings.",
"color": "emerald"
},
{
"level_key": "poor",
"label": "Poor",
"prompt_md": "The agent ignored or dismissed the caller's feelings.",
"color": "rose"
}
],
"target_level_keys": ["excellent"],
"weight": 10,
"created_from_version_id": null,
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T10:00:00.000Z"
}
}
}
Headers
Body Parameters
template_key and user_template_id are mutually exclusive. If both are provided, user_template_id wins.Response
Verdict levels for graded mode. Empty array for pass/fail mode. Each level contains
level_key, label, prompt_md, and optionally color.{
"errors": null,
"data": {
"agent": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"key": "empathy-check",
"name": "Empathy Check",
"description": "Grades how empathetic the agent sounds during difficult conversations.",
"current_version_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"active_version_id": null,
"metadata": {},
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T10:00:00.000Z",
"deleted_at": null
},
"current_version": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 1,
"name": "Empathy Check v1",
"description": null,
"state": "editable",
"modality": "audio",
"system_prompt_md": "You are an expert call quality reviewer.",
"prompt_md": "Did the agent express empathy when the caller described their problem?",
"levels": [
{
"level_key": "excellent",
"label": "Excellent",
"prompt_md": "The agent clearly and warmly acknowledged the caller's feelings.",
"color": "emerald"
},
{
"level_key": "poor",
"label": "Poor",
"prompt_md": "The agent ignored or dismissed the caller's feelings.",
"color": "rose"
}
],
"target_level_keys": ["excellent"],
"weight": 10,
"created_from_version_id": null,
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T10:00:00.000Z"
}
}
}
Was this page helpful?
⌘I
Create Eval Agent
curl --request POST \
--url https://api.bland.ai/v1/evals/agents \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": {},
"template_key": {},
"user_template_id": {},
"modality": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/evals/agents"
payload = {
"name": "<string>",
"description": {},
"template_key": {},
"user_template_id": {},
"modality": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: {},
template_key: {},
user_template_id: {},
modality: '<string>'
})
};
fetch('https://api.bland.ai/v1/evals/agents', 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/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => [
],
'template_key' => [
],
'user_template_id' => [
],
'modality' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/evals/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": {},\n \"template_key\": {},\n \"user_template_id\": {},\n \"modality\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/evals/agents")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": {},\n \"template_key\": {},\n \"user_template_id\": {},\n \"modality\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": {},\n \"template_key\": {},\n \"user_template_id\": {},\n \"modality\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errors": null,
"data": {
"agent": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"key": "empathy-check",
"name": "Empathy Check",
"description": "Grades how empathetic the agent sounds during difficult conversations.",
"current_version_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"active_version_id": null,
"metadata": {},
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T10:00:00.000Z",
"deleted_at": null
},
"current_version": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 1,
"name": "Empathy Check v1",
"description": null,
"state": "editable",
"modality": "audio",
"system_prompt_md": "You are an expert call quality reviewer.",
"prompt_md": "Did the agent express empathy when the caller described their problem?",
"levels": [
{
"level_key": "excellent",
"label": "Excellent",
"prompt_md": "The agent clearly and warmly acknowledged the caller's feelings.",
"color": "emerald"
},
{
"level_key": "poor",
"label": "Poor",
"prompt_md": "The agent ignored or dismissed the caller's feelings.",
"color": "rose"
}
],
"target_level_keys": ["excellent"],
"weight": 10,
"created_from_version_id": null,
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T10:00:00.000Z"
}
}
}