# Cancel job

URL: https://clippie.ai/developers/docs/cancel-job

Cancels a job that is still queued and refunds what it was charged. Jobs that have started cannot be canceled.

## At a glance

| Property | Value |
| --- | --- |
| REST | `POST https://api.clippie.ai/v1/jobs/:id/cancel` |
| MCP tool | `cancel_job` |
| Scope | `create` |
| Cost | Spends nothing. Needs the `create` scope. |

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `id` | path | string | Yes |  | The job id, job_… 1-80 chars. |

## Example

curl:

```bash
curl https://api.clippie.ai/v1/jobs/job_abc123/cancel \
  -H "Authorization: Bearer $CLIPPIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

cancel-job.mjs:

```js
const auth = { Authorization: `Bearer ${process.env.CLIPPIE_API_KEY}` };

const res = await fetch('https://api.clippie.ai/v1/jobs/job_abc123/cancel', {
  method: 'POST',
  headers: { ...auth, 'Content-Type': 'application/json' },
  body: JSON.stringify({}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
console.log(await res.json());
```

## Response

`200` with JSON. The full response schema is in the [OpenAPI spec](https://api.clippie.ai/v1/openapi.json).

## From an MCP client

Your AI calls `cancel_job` with the same fields as JSON arguments. See [MCP server](https://clippie.ai/developers/docs.md#mcp) to connect one.

tools/call:

```json
{
  "name": "cancel_job",
  "arguments": {
    "id": "job_abc123"
  }
}
```
