# Cancel a run
Source: https://docs.simpleserve.ai/docs/api-reference/runs/post-runs-run_id-cancel

Method: POST /v1/runs/{run_id}/cancel
Base URL: https://api.simpleserve.ai

```json
{
  "path": "/v1/runs/{run_id}/cancel",
  "method": "POST",
  "tags": [
    "Runs"
  ],
  "operationId": "cancelRun",
  "summary": "Cancel a run",
  "description": "Requests cancellation. A terminal run is returned unchanged. Work that\ncompleted before cancellation remains billable and appears in `usage`.\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/RunId"
    },
    {
      "$ref": "#/components/parameters/IdempotencyKey"
    }
  ],
  "responses": {
    "200": {
      "description": "The current run after the cancellation request.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/RequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Run"
          },
          "examples": {
            "cancelled": {
              "$ref": "#/components/examples/CancelledRunExample"
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    },
    "500": {
      "$ref": "#/components/responses/InternalError"
    }
  }
}
```