Documentation

Cancel a Run

Request cancellation, then retrieve the same Run to learn its final execution and billing outcome.

View as Markdown
On this page

Endpoint

This request has no JSON body. The credential must have permission for the tool's behavior. Inspection reports supplier cancellation support.

A 200 or 202 response reports the current Run; it does not prove the supplier stopped. Continue retrieving the original Run until execution and billing are resolved.

HTTP
POST /v1/runs/{runId}/cancel

Parameters

NameLocationTypeRequiredConstraints
runIdpathstringRequired—

Request example

Set PURRKEY_API_KEY in your trusted server or terminal environment. Replace any angle-bracket placeholders with values from your own inspection or Run.

Bash
curl --fail-with-body --request POST 'https://api.purrkey.app/v1/runs/<runId>/cancel' \
  -H "Authorization: Bearer $PURRKEY_API_KEY"

Successful response

Success HTTP status: 200, 202. Top-level response fields are listed below. Conditional and nested requirements are defined in the downloadable OpenAPI contract.

FieldTypeRequiredConstraints
runIdstringRequired—
toolIdstringRequired—
toolRevisionstringRequired—
toolNamestringOptional / conditional—
statusstringRequiredQUEUED | SUBMITTING | RUNNING | WAITING_PROVIDER | SUCCEEDED | FAILED | CANCELED | TIMED_OUT | UNKNOWN
billingobjectRequired—
createdAtstringRequireddate-time
updatedAtstringRequireddate-time
cancelRequestedAtstringOptional / conditionaldate-time
paymentobjectOptional / conditional—
inputJSON valueOptional / conditional—
resultobjectRequired—
errorobjectOptional / conditional—
pollAfterMsintegerOptional / conditionalint32; Minimum: 0

Errors and related reading