Skip to content
Runs

Cancel a run

POST/api/v1alpha1/runs/{run_id}/cancel

Asks a pending or running analysis run to stop.

  • Access: an alpha-enabled API key with the RUN_WORKFLOWS permission.
  • Asynchronous: cancellation is a request, not a guarantee.
  • Retries: an optional Idempotency-Key makes a repeated cancellation safe.

Keep polling GET /api/v1alpha1/runs/{run_id} until the run reaches a final state.

AuthorizationBearer <token>

In: header

Path Parameters

run_id*string

Identifier of an analysis run, as returned when the run was created.

Header Parameters

Idempotency-Key?string

Optional key for safe retry of this POST. The key is retained for 24 hours and compared with the request payload and concrete path parameters.

Lengthlength <= 255

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1alpha1/runs/run_0190b5d4-7e1f-7a2b-9c3d-1234567890ab/cancel" \  -H "Authorization: Bearer $DEEPFRAME_API_KEY"
{  "created_at": "2026-08-08T10:00:00.000Z",  "id": "run_0190b5d4-7e1f-7a2b-9c3d-1234567890ab",  "kind": "workflow",  "status": "queued",  "updated_at": "2026-08-08T10:07:30.000Z",  "workflow": {    "case_id": "case_0190b5d4-7e1f-7a2b-9c3d-1234567890ab",    "error": {      "code": "budget_exhausted",      "detail": "",      "next_action": "",      "title": ""    },    "error_message": "",    "provenance": {      "execution_profile": "premium-analysis@1",      "provenance_ref": "prov_0190b5d4-analysis",      "request_id": "0190b5d4-7e1f-7a2b-9c3d-1234567890ab",      "usage": {        "cached_input_tokens": 0,        "input_tokens": 0,        "media_seconds": 0,        "output_tokens": 0,        "provider_returned_cost": "",        "total_tokens": 0      }    },    "reason_code": "",    "report_id": "rep_0190b5d4-7e1f-7a2b-9c3d-1234567890ab",    "rule_set_version_id": "snap_7ef3a4b2c1d0",    "rulebook_id": "rb_0190b5d4-7e1f-7a2b-9c3d-1234567890ab",    "source_snapshot": {      "source_ids": [        "vid_0190b5d4-7e1f-7a2b-9c3d-1234567890ab"      ]    },    "summary": "Workflow execution is evaluating indexed evidence.",    "workflow_id": "wf_0190b5d4-7e1f-7a2b-9c3d-1234567890ab"  }}