---
title: "Cancel a running/queued job."
method: POST
path: "/v1/jobs/{job_id}/cancel"
tags: ["jobs"]
---

# Cancel a running/queued job.

`POST /v1/jobs/{job_id}/cancel`

## Request

- Base URL: `https://api.japanfold.aiand.com`
- URL: `https://api.japanfold.aiand.com/v1/jobs/{job_id}/cancel`
- Auth: one of:
  - none
  - HTTP bearer

A queued job ends at once. A running job ends when its run has stopped, usually a few seconds later, and the request holds up to 15 s for that. The answer is the job's state after the hold: `status` and `finished_at` once it has ended, or `running` with a `detail` naming the `?wait=` call that returns when it has. `canceled` is false for a job that had already ended.

## Path parameters

- `job_id` string, required

## Response `200`

The job after the cancel

- object
  - `canceled` boolean
  - `detail` string
  - `finished_at` string, date-time, nullable
  - `id` string
  - `status` 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled'

## Other responses

- `401`: Unauthorized
- `404`: Not found

---

[API](https://skmtc.dev/aiand/apis/japanfold-api.md) · [All operations](https://skmtc.dev/aiand/apis/japanfold-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aiand/apis/japanfold-api/revisions/9f4be813b447?raw)
