create label
create_labelRecord a pass/fail verdict on a logged request or whole agent run to provide ground truth for judge calibration, corrected pass rates, and training rewards.
Instructions
Record a human or downstream-system pass/fail verdict on a logged request (or on the whole agent run it belongs to) — this is the ground truth judge calibration, corrected pass rates, and training rewards are measured against. POST /v1/labels (API-key scope: evals:write). Returns: 201 with the stored label: { id, request_id, verdict, critique, source ('human'), scope, fail_causes: string[], created_at }. Notes: Upsert by request_id: re-labeling the same request replaces the verdict/critique/scope (newest judgment wins); a 'pass' clears any prior failure attributions. Requires the key's minting user to be workspace OWNER/ADMIN (403) — labels define quality. Side effects: settles pending judge suspicions on the trace, fulfils pending recalibration-slice requests, and flags affected judges' calibrations for revision. Validation errors (e.g. bad scope, over-long critique) return 400 with the schema message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | "request" (default) grades this one exchange; "trace" grades the whole agent run the request belongs to. Trace-unit judges calibrate only against trace-scoped labels. Unknown values are rejected with 400, never silently dropped. | |
| verdict | Yes | The grade. WARNING: if omitted the route defaults to "pass" — always send it explicitly. | |
| critique | No | Why (max 2000 chars). Strongly encouraged on fails — becomes judge few-shot material and failure-taxonomy text. null allowed. | |
| request_id | Yes | The gateway request id being graded (1..128 chars after trim). For scope=trace, send the run's FINAL-step request id. Missing/empty → 400. |