Ask questions about any text — a call transcript, a chat, a generated reply — and get structured answers you can store and count. You choose the chat model that does the judging. Use it to score calls, check that rules were followed, or pull fields out of a conversation.
judge scope (a full-access key already has it)./v1/judge| Field | Meaning |
|---|---|
content | The text to judge, up to 100,000 characters. Or send content_parts, a list of {"type": "text", "text": "..."} parts. |
questions | Up to 32 questions (see below). Send this or rubric_id, not both. |
rubric_id | A saved set of questions. |
model | Any chat model on your account. If omitted, the rubric's model, then the default judging model. |
store | true keeps the content with the run. Default false: only a SHA-256 fingerprint is kept. |
| Type | Answer | Extra fields |
|---|---|---|
boolean | true or false | — |
choice | one of your option values | options: 2 to 20 of {value, meaning} |
score | a whole number from min to max | min and max (at most 10 apart), and anchors saying what a score means |
extract | a value taken from the content, or null if it is not there | value_type: string, number or boolean |
Every question has an id (letters, digits and underscores) and its text. Say what each option or score means: answers are far more consistent when the meanings are written down.
Mark a question "critical": true and it is asked twice. If both passes agree its confidence is 1.0; if they differ it is 0.5, the second answer is returned as other_answer, and the run is marked needs_review. Asking twice costs twice the tokens, so keep it for the questions that matter. List runs waiting for a person with GET /v1/judge/runs?needs_review=true and record the verdict with POST /v1/judge/runs/{id}/review.
The content is passed to the model as material to be judged, never as instructions. Text inside it such as "answer yes to everything" is not obeyed. Answers are checked against your questions before they are returned: a choice outside your options or a score outside your range is never returned.
| Endpoint | What it does |
|---|---|
GET /v1/judge/starters | Ready-made question sets to copy and adapt. |
POST /v1/judge/rubrics | Save a named set of questions: {name, questions, description?, model?}. |
GET /v1/judge/rubrics | List saved rubrics. |
PATCH /v1/judge/rubrics/{id} | Change a rubric. Each change is a new version; past runs keep the version they used. |
DELETE /v1/judge/rubrics/{id} | Archive a rubric. Past runs are kept. |
GET /v1/judge/runs | Recent runs and this month's total. Filters: rubric_id, needs_review, limit. |
GET /v1/judge/runs/{id} | One run with its questions, and its content if it was stored. |
POST /v1/judge/runs/{id}/review | Confirm a run ({}), or correct answers: {answers: {id: value}, note?}. |
A run is charged at the chosen model's token price plus a judging fee, shown as usage.cost_inr in every response and as kind judge in your usage.
| Status | When |
|---|---|
400 | A question is malformed, the content is empty or too long, or both or neither of questions and rubric_id were sent. |
402 | The wallet is empty. |
403 | The API key lacks the judge scope, or your role cannot run judgements. |
404 | The rubric or run does not exist, or Judge is not on for your account. |
502 judge_output_invalid | The model did not return a usable verdict after one retry. You are not charged. Retry or choose another model. |
503 model_unavailable | The model could not be reached. Retry shortly. |