Skip to Content
Eval runs

Grade calls that already happened

Permissioneval-runs:createAdd-onEvaluationsRetriesIdempotency-Key requiredAuthentication
POST
/eval-runs/grade-calls

Queues a run that scores finished production calls against the checks attached to a suite, instead of simulating new conversations.

Nothing is dispatched and no upstream tool is invoked, so this needs no live-tool permission — but it reads call content, and therefore also requires calls:read.

Choosing the calls

Supply call_ids or call_filter; ids win when both are given. At most 5,000 calls per run.

The selection is resolved at request time, so an empty match is a 409 here rather than a failed run later.

Checks whose evidence is not persisted on a finished call abstain rather than pass.

Poll Location after Retry-After.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

application/json
  1. body
suite_id*string

The suite whose attached checks do the grading.

Formatuuid
call_ids?array<>

Explicit calls to grade. Ids belonging to another org, or to calls that never finished, are dropped rather than failing the run.

Itemsitems <= 5000
call_filter?|

Used only when call_ids is empty. Matches finished calls, newest first, capped at 5000.

Response Body

Grading run accepted and queued.

application/json
  1. response
id*string
Formatuuid
total*integer

How many calls the selection resolved to.

Example Request
curl -X POST 'https://api.kejue.co/v1/eval-runs/grade-calls' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "suite_id": "3e9c08eb-436b-4d4b-9cfe-ca21d8bdb99b"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "total": 0}