v1

latestOpenAPI 3.1.02026-07-2618690613.4 KB
AI Eval

Cancel an eval run

Cancel an in-flight eval run. Marks the run cancelled first so no in-progress per-prompt job can flip it back to COMPLETE, then cancels every non-terminal agentic job associated with the run. The run is also archived as part of the cancel — the response returns the updated run inline (status: CANCELLED, is_archived: true); use /unarchive to surface it in the default archived=false list again.

post/v1/ai/eval/runs/{runId}/cancel

Path parameters

runIdstring uuid required

The unique identifier of the eval run.

Example:660e8400-e29b-41d4-a716-446655440001

The unique identifier of the eval run.

Response

Cancellation processed.

cancelledinteger required

Number of per-prompt agentic jobs that were cancelled by this request.

totalinteger required

Total number of per-prompt jobs in the run.

Example response

{
  "cancelled": 4,
  "run": {
    "created_at": "2025-01-15T10:00:00.000Z",
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "model_id": "880e8400-e29b-41d4-a716-446655440003",
    "prompt_set_id": "550e8400-e29b-41d4-a716-446655440000",
    "results": [
      {
        "agentic_job": {
          "conversation_id": "770e8400-e29b-41d4-a716-446655440002",
          "id": "990e8400-e29b-41d4-a716-446655440004",
          "state": "COMPLETE"
        },
        "cost": 0.0021,
        "id": "aa0e8400-e29b-41d4-a716-446655440005",
        "prompt": "What are the top 5 products by revenue?",
        "score": 0.9,
        "scoring_cost": 0.0004,
        "timing_ms": 4321
      }
    ],
    "run_number": 3,
    "status": "RUNNING"
  },
  "total": 12
}