---
title: "Cancel Batch Job"
method: POST
path: "/api/v1/beta/batch-processing/{job_id}/cancel"
tags: ["Beta", "Batch Processing"]
---

# Cancel Batch Job

`POST /api/v1/beta/batch-processing/{job_id}/cancel`

Cancel a running batch processing job.

Stops processing and marks pending items as cancelled.
Items currently being processed may still complete.

## Path parameters

- `job_id` string, required

## Query parameters

- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable

## Headers

- `temporal-namespace` string, nullable

## Cookies

- `session` string, nullable

## Request body

- BatchJobCancelRequest — Request to cancel a running batch job.
  - `reason` string, nullable — Optional reason for cancelling the job

## Response `200`

Successful Response

- BatchJobCancelResponse — Response after cancelling a batch job.
  - `job_id` string, required — ID of the cancelled job
  - `status` 'pending' | 'running' | 'dispatched' | 'completed' | 'failed' | 'cancelled', required — Status of a batch processing job.
  - `processed_items` integer, required — Number of items processed before cancellation
  - `message` string, required — Confirmation message

## Other responses

- `422` — Validation Error

## Changes

- **2026-06-09** `b17341164de9` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/run-llama/apis/llama-platform/changes/api/v1/beta/batch-processing/:job_id/cancel/post.md)

---

[API](https://skmtc.dev/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.dev/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/run-llama/llama-platform/revisions/b17341164de9/schema)
