curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/eval-judges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Default judge",
"description": "Full template, temperature 0",
"model": "gemini-2.5-flash",
"prompt_template": "Test case: {name}\nWhen relevant: {when_relevant}\nSuccess: {success_criteria}\nFailure: {failure_criteria}\n\nTranscript:\n{conversation_text}",
"temperature": 0
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/eval-judges"
payload = {
"name": "Default judge",
"description": "Full template, temperature 0",
"model": "gemini-2.5-flash",
"prompt_template": "Test case: {name}
When relevant: {when_relevant}
Success: {success_criteria}
Failure: {failure_criteria}
Transcript:
{conversation_text}",
"temperature": 0
}
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: 'Default judge',
description: 'Full template, temperature 0',
model: 'gemini-2.5-flash',
prompt_template: 'Test case: {name}\nWhen relevant: {when_relevant}\nSuccess: {success_criteria}\nFailure: {failure_criteria}\n\nTranscript:\n{conversation_text}',
temperature: 0
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/eval-judges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"judge": {
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"project_id": "4f3a9b2c-1d2e-4f5a-8b6c-7d8e9f0a1b2c",
"name": "Default judge",
"description": "Full template, temperature 0",
"model": "gemini-2.5-flash",
"prompt_template": "Test case: {name}\nWhen relevant: {when_relevant}\nSuccess: {success_criteria}\nFailure: {failure_criteria}\n\nTranscript:\n{conversation_text}",
"temperature": 0,
"created_by": "org-token:42",
"created_at": "2026-10-22T10:00:00.000Z",
"updated_at": "2026-10-22T10:00:00.000Z"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "An eval judge named \"Default judge\" already exists in this project"
}{
"error": "name: String must contain at least 1 character(s)",
"issues": [
{
"path": "name",
"code": "too_small",
"message": "String must contain at least 1 character(s)",
"minimum": 1
}
]
}Create an eval judge
Creates a judge. The prompt template must contain the placeholders the judge fills for each test case; GET …/eval-judges/templates returns ready-made templates to start from.
curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/eval-judges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Default judge",
"description": "Full template, temperature 0",
"model": "gemini-2.5-flash",
"prompt_template": "Test case: {name}\nWhen relevant: {when_relevant}\nSuccess: {success_criteria}\nFailure: {failure_criteria}\n\nTranscript:\n{conversation_text}",
"temperature": 0
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/eval-judges"
payload = {
"name": "Default judge",
"description": "Full template, temperature 0",
"model": "gemini-2.5-flash",
"prompt_template": "Test case: {name}
When relevant: {when_relevant}
Success: {success_criteria}
Failure: {failure_criteria}
Transcript:
{conversation_text}",
"temperature": 0
}
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: 'Default judge',
description: 'Full template, temperature 0',
model: 'gemini-2.5-flash',
prompt_template: 'Test case: {name}\nWhen relevant: {when_relevant}\nSuccess: {success_criteria}\nFailure: {failure_criteria}\n\nTranscript:\n{conversation_text}',
temperature: 0
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/eval-judges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"judge": {
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"project_id": "4f3a9b2c-1d2e-4f5a-8b6c-7d8e9f0a1b2c",
"name": "Default judge",
"description": "Full template, temperature 0",
"model": "gemini-2.5-flash",
"prompt_template": "Test case: {name}\nWhen relevant: {when_relevant}\nSuccess: {success_criteria}\nFailure: {failure_criteria}\n\nTranscript:\n{conversation_text}",
"temperature": 0,
"created_by": "org-token:42",
"created_at": "2026-10-22T10:00:00.000Z",
"updated_at": "2026-10-22T10:00:00.000Z"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "An eval judge named \"Default judge\" already exists in this project"
}{
"error": "name: String must contain at least 1 character(s)",
"issues": [
{
"path": "name",
"code": "too_small",
"message": "String must contain at least 1 character(s)",
"minimum": 1
}
]
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Path Parameters
Project id
Body
Unique within the project.
1 - 256The judge model. Must be a model the platform's judge supports (for example gemini-2.5-flash); anything else is refused with 422.
1The judge prompt. Must contain the placeholders {name}, {when_relevant}, {success_criteria}, {failure_criteria} and {conversation_text}. Start from GET …/eval-judges/templates.
0 <= x <= 2Response
The created judge
An LLM judge configuration: the model, temperature and prompt template used to decide each test case of an eval call.
Show child attributes
Show child attributes