---
title: "Cancel a job"
description: "Cancel a job that has not finished. The engine reads the cancellation immediately before it submits the request to the model provider. When the job has not been submitted, the run stops, the whole credit reservation is refunded, the job becomes canceled, and the response returns cancel_honoured: true. When the provider already holds the request it cannot be recalled: the cancellation is recorded, the run finishes, the job is billed normally, and the response returns cancel_honoured: false. A job that already finished answers 409 job_not_cancelable."
url: https://docs.roasos.com/api-reference/jobs/cancelJob
---

# Cancel a job

Cancel a job that has not finished. The engine reads the cancellation immediately before it submits the request to the model provider. When the job has not been submitted, the run stops, the whole credit reservation is refunded, the job becomes canceled, and the response returns cancel_honoured: true. When the provider already holds the request it cannot be recalled: the cancellation is recorded, the run finishes, the job is billed normally, and the response returns cancel_honoured: false. A job that already finished answers 409 job_not_cancelable.

## `POST /v1/jobs/{id}/cancel`

Endpoint: `POST https://api.roasos.com/v1/jobs/{id}/cancel`

Cancel a job

Cancel a job that has not finished. The engine reads the cancellation immediately before it submits the request to the model provider. When the job has not been submitted, the run stops, the whole credit reservation is refunded, the job becomes canceled, and the response returns cancel_honoured: true. When the provider already holds the request it cannot be recalled: the cancellation is recorded, the run finishes, the job is billed normally, and the response returns cancel_honoured: false. A job that already finished answers 409 job_not_cancelable.

### Parameters

- `id` (path) — required

### Responses

- `200`: Cancellation recorded
- `400`: The job ID is not a UUID
- `403`: job_not_cancelable_by_caller: the roasos_cancel_job MCP tool cancels only a job that the same API key or connection started. The person can cancel the job in the roasOS app.
- `404`: Job not found in this workspace
- `409`: job_not_cancelable: the job has already finished
- `503`: The cancellation could not be recorded

Read the full reference at https://docs.roasos.com/api-reference/jobs/cancelJob.
