Skip to main content
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>"
}
'
{
  "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"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.bland.ai/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string
required
Your API key for authentication.

Body Parameters

name
string
Display name for the eval agent. Between 1 and 200 characters.
description
string | null
Optional description of what the eval agent grades.
template_key
string | null
Key of a shipped template to seed the agent from.
user_template_id
string | null
ID of a saved user template to seed the agent from.
modality
string
The modality for the eval agent. One of text or audio.
template_key and user_template_id are mutually exclusive. If both are provided, user_template_id wins.

Response

data.agent
object
The newly created eval agent.
data.agent.id
string
Unique identifier for the eval agent.
data.agent.org_id
string
ID of the organization that owns this eval agent.
data.agent.key
string
Unique slug key for the eval agent within the organization.
data.agent.name
string
Display name of the eval agent.
data.agent.description
string | null
Optional description of what the eval agent grades.
data.agent.current_version_id
string
ID of the current editable draft version.
data.agent.active_version_id
string | null
ID of the published version, or null if never published.
data.agent.metadata
object
Key-value metadata associated with the eval agent. Values are strings.
data.agent.created_at
string
ISO 8601 timestamp for when the eval agent was created.
data.agent.updated_at
string
ISO 8601 timestamp for when the eval agent was last updated.
data.agent.deleted_at
string | null
ISO 8601 timestamp if the eval agent has been soft-deleted, otherwise null.
data.current_version
object
The editable draft version created alongside the agent.
data.current_version.id
string
Unique identifier for this version.
data.current_version.org_id
string
ID of the organization that owns this version.
data.current_version.eval_agent_id
string
ID of the parent eval agent.
data.current_version.version_number
integer
Sequential version number.
data.current_version.name
string
Name of this version.
data.current_version.description
string | null
Optional description of this version.
data.current_version.state
string
Always "editable" for a newly created draft.
data.current_version.modality
string
One of text or audio.
data.current_version.system_prompt_md
string
The system prompt for the judge LLM, in Markdown.
data.current_version.prompt_md
string
The grading prompt for the judge LLM, in Markdown.
data.current_version.levels
array of objects
Verdict levels for graded mode. Empty array for pass/fail mode. Each level contains level_key, label, prompt_md, and optionally color.
data.current_version.target_level_keys
array of strings
Which level keys count as a target match. Empty array for pass/fail agents.
data.current_version.weight
number
Relative weight of this agent in aggregate scoring. Between 0 and 100.
data.current_version.created_from_version_id
string | null
ID of the version this was forked from, or null if this is the first version.
data.current_version.created_by
string | null
Identifier of the user who created this version, or null.
data.current_version.created_at
string
ISO 8601 timestamp for when this version was created.
data.current_version.updated_at
string
ISO 8601 timestamp for when this version was last updated.
{
  "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"
    }
  }
}