---
title: "Cancel AI job"
method: POST
path: "/v1/ai/jobs/{jobId}/cancel"
tags: ["AI"]
---

# Cancel AI job

`POST /v1/ai/jobs/{jobId}/cancel`

Request cancellation of an AI job. This endpoint is idempotent — calling it on an already-cancelled or completed job returns success with the current state. 

- For `QUEUED` jobs, cancellation is immediate
- For `EXECUTING` jobs, the worker will stop after completing its current iteration
- Jobs in a `DELIVERING` state cannot be cancelled as they are already finalizing results. **Only the job owner or organization admins can cancel jobs.**

## Path parameters

- `jobId` string, uuid, required

## Response `200`

Job cancelled successfully

- object
  - `jobId` string, uuid — The unique identifier for the cancelled job
  - `state` 'CANCELLED' — The new state of the job

## Other responses

- `400` — Bad Request Possible error messages: - `Job is not in a cancellable state`
- `401` — Unauthorized Possible error messages: - `Missing or invalid API key`
- `403` — Forbidden Possible error messages: - `Permission denied. Only the job owner or organization admins can cancel jobs.`
- `404` — Job not found. The job may not exist or may belong to a different organization.
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500` — Internal Server Error

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/revisions/6b02f7349d0e/schema)
