curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{agentId}/eval-submissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Booking regression 2026-10-22 14:00",
"suite_id": "suite_01",
"judge_id": "judge_01",
"runs_per_scenario": 2,
"max_parallel_calls": 2
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{agentId}/eval-submissions"
payload = {
"name": "Booking regression 2026-10-22 14:00",
"suite_id": "suite_01",
"judge_id": "judge_01",
"runs_per_scenario": 2,
"max_parallel_calls": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Booking regression 2026-10-22 14:00',
suite_id: 'suite_01',
judge_id: 'judge_01',
runs_per_scenario: 2,
max_parallel_calls: 2
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{agentId}/eval-submissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"submission": {
"id": "sub_01J9",
"project_id": "proj_123",
"created_by": null,
"agent_id": "agent_456",
"judge_id": "judge_01",
"suite_id": "suite_01",
"name": "Booking regression 2026-10-22 14:00",
"description": null,
"runs_per_scenario": 2,
"judge_concurrency": 5,
"judge_max_retries": 3,
"max_parallel_calls": 2,
"status": "paused",
"use_isolated_data": false,
"simulator_audio_stack": "hamsa",
"simulator_llm": "gemini",
"simulator_silence_mode": "off",
"simulator_model_config": null,
"agent_version_id": "ver_789",
"agent_version_number": 12,
"error_message": null,
"created_at": "2026-10-22T14:00:00.000Z",
"updated_at": "2026-10-22T14:00:00.000Z",
"judge": {
"id": "judge_01",
"name": "Default judge",
"description": null,
"model": "gemini-3.5-flash",
"prompt_template": "…",
"temperature": 0
},
"suite": {
"id": "suite_01",
"name": "Booking flows",
"description": null,
"scenario_ids": [
"scn_01"
],
"common_test_case_ids": [
"tc_7f3a"
]
},
"scenarios": [
{
"id": "scn_01",
"name": "Caller books for tomorrow",
"description": null,
"simulator_config": {
"prompt": "You want to book a cleaning for tomorrow morning.",
"max_turns": 20
},
"test_case_ids": [],
"test_cases": []
}
],
"common_test_cases": [
{
"id": "tc_7f3a",
"project_id": "proj_123",
"name": "Confirms the booking",
"description": null,
"when_relevant": "The caller asked to book an appointment.",
"success_criteria": "The agent repeats the date and time back and the caller confirms.",
"failure_criteria": "The agent ends the call without confirming the date and time.",
"created_by": null,
"created_at": "2026-10-01T09:00:00.000Z",
"updated_at": "2026-10-01T09:00:00.000Z"
}
],
"runs_completed": 0,
"runs_total": 2,
"judge_counts": {
"pending": 0,
"in_progress": 0,
"done": 0,
"error": 0,
"error_final": 0,
"unusable": 0
}
}
}{
"error": "eval suite uses field overrides not declared in agent.prompt_field_whitelist: \"lead_source\" (from suite \"Booking flows\"). Either add the keys under .system or .custom on the agent, or remove them from the suite/scenario field_overrides.",
"offenders": [
{
"key": "lead_source",
"source": "suite \"Booking flows\""
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Eval suite not found in this project",
"suite_id": "suite_01"
}{
"error": "This agent has no published version — run the eval on its draft explicitly (use_draft: true) or publish it first",
"code": "no_published_version"
}{
"error": "use_draft and agent_version_id are mutually exclusive",
"issues": [
{
"path": "",
"code": "custom",
"message": "use_draft and agent_version_id are mutually exclusive"
}
]
}Create an eval run
Creates an eval run that calls this agent with the suite’s simulated callers and grades each call with the chosen judge. The run is created paused and places no calls until you start it with POST …/eval-submissions/{id}/run. By default it tests the agent’s current published version; the version is fixed when the run is created, so publishing later does not change a run in progress.
curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{agentId}/eval-submissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Booking regression 2026-10-22 14:00",
"suite_id": "suite_01",
"judge_id": "judge_01",
"runs_per_scenario": 2,
"max_parallel_calls": 2
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{agentId}/eval-submissions"
payload = {
"name": "Booking regression 2026-10-22 14:00",
"suite_id": "suite_01",
"judge_id": "judge_01",
"runs_per_scenario": 2,
"max_parallel_calls": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Booking regression 2026-10-22 14:00',
suite_id: 'suite_01',
judge_id: 'judge_01',
runs_per_scenario: 2,
max_parallel_calls: 2
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{agentId}/eval-submissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"submission": {
"id": "sub_01J9",
"project_id": "proj_123",
"created_by": null,
"agent_id": "agent_456",
"judge_id": "judge_01",
"suite_id": "suite_01",
"name": "Booking regression 2026-10-22 14:00",
"description": null,
"runs_per_scenario": 2,
"judge_concurrency": 5,
"judge_max_retries": 3,
"max_parallel_calls": 2,
"status": "paused",
"use_isolated_data": false,
"simulator_audio_stack": "hamsa",
"simulator_llm": "gemini",
"simulator_silence_mode": "off",
"simulator_model_config": null,
"agent_version_id": "ver_789",
"agent_version_number": 12,
"error_message": null,
"created_at": "2026-10-22T14:00:00.000Z",
"updated_at": "2026-10-22T14:00:00.000Z",
"judge": {
"id": "judge_01",
"name": "Default judge",
"description": null,
"model": "gemini-3.5-flash",
"prompt_template": "…",
"temperature": 0
},
"suite": {
"id": "suite_01",
"name": "Booking flows",
"description": null,
"scenario_ids": [
"scn_01"
],
"common_test_case_ids": [
"tc_7f3a"
]
},
"scenarios": [
{
"id": "scn_01",
"name": "Caller books for tomorrow",
"description": null,
"simulator_config": {
"prompt": "You want to book a cleaning for tomorrow morning.",
"max_turns": 20
},
"test_case_ids": [],
"test_cases": []
}
],
"common_test_cases": [
{
"id": "tc_7f3a",
"project_id": "proj_123",
"name": "Confirms the booking",
"description": null,
"when_relevant": "The caller asked to book an appointment.",
"success_criteria": "The agent repeats the date and time back and the caller confirms.",
"failure_criteria": "The agent ends the call without confirming the date and time.",
"created_by": null,
"created_at": "2026-10-01T09:00:00.000Z",
"updated_at": "2026-10-01T09:00:00.000Z"
}
],
"runs_completed": 0,
"runs_total": 2,
"judge_counts": {
"pending": 0,
"in_progress": 0,
"done": 0,
"error": 0,
"error_final": 0,
"unusable": 0
}
}
}{
"error": "eval suite uses field overrides not declared in agent.prompt_field_whitelist: \"lead_source\" (from suite \"Booking flows\"). Either add the keys under .system or .custom on the agent, or remove them from the suite/scenario field_overrides.",
"offenders": [
{
"key": "lead_source",
"source": "suite \"Booking flows\""
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Eval suite not found in this project",
"suite_id": "suite_01"
}{
"error": "This agent has no published version — run the eval on its draft explicitly (use_draft: true) or publish it first",
"code": "no_published_version"
}{
"error": "use_draft and agent_version_id are mutually exclusive",
"issues": [
{
"path": "",
"code": "custom",
"message": "use_draft and agent_version_id are mutually exclusive"
}
]
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Body
A run of one eval suite against this agent, graded by one judge. By default the run tests the agent's current published version; set use_draft to test the draft, or agent_version_id to test a specific version. use_draft and agent_version_id cannot be combined.
Unique per agent. Adding a date or time is the usual way to name repeated runs.
1 - 256The eval suite to run
1The judge that grades each call
1How many calls to place for each scenario.
1 <= x <= 10How many calls are graded at once.
1 <= x <= 50Retries when a grading request fails.
0 <= x <= 10Most calls this run has in progress at once. A platform-wide limit also applies.
1 <= x <= 10Test cases to check on every call of this run, in addition to the suite's own.
501Suite-wide test cases to leave out of this run.
501Give each call its own temporary copy of the Google Sheets the agent's tools use, so calls cannot change the real sheets or each other's data. Has no effect when no tool declares a sheet.
Speech recognition and synthesis used by the simulated caller. Omitted: the default for your deployment. A value your deployment cannot provide is refused with 422.
hamsa, humain, hamsa_selfhosted Language model behind the simulated caller. Omitted: the default for your deployment. A value your deployment cannot provide is refused with 422.
selfhosted, gemini Whether the simulated caller may stay silent to wait for the agent: off (default) never, always whenever waiting is the right next step, flexible when a reasonable person would.
off, always, flexible Optional models for the simulated caller, one slot each for speech recognition, language model and speech synthesis. Each slot you include must name both a provider and a model; a slot you leave out keeps the default for the run. Choose values from the simulated-caller options of GET /v1/agents/chained-options.
Show child attributes
Show child attributes
Test the agent's current draft instead of its published version.
Test this specific version of the agent (any status).
1Response
The run was created, paused
An eval run: one suite run against one agent version and graded by one judge, with the suite, judge, scenarios and test cases it uses and its progress so far.
Show child attributes
Show child attributes