---
title: "Delete a batch"
method: DELETE
path: "/batch/{batch_id}"
tags: ["Batch"]
---

# Delete a batch

`DELETE /batch/{batch_id}`

Permanently delete a finished batch and its stored results. Active batches must settle first.

## Path parameters

- `batch_id` string, required — ID of the batch to retrieve or cancel.

## Response `200`

Batch and its stored results are permanently deleted.

- object
  - `id` string — ID of the deleted batch.
  - `deleted` boolean — Always true on success.
  - `key_metadata` KeyMetadata — Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.
    - `credits_consumed` integer, required — The number of credits consumed by this request.
    - `credits_remaining` integer, required — The number of credits remaining for your organization after this request.

## Other responses

- `401` — Unauthorized
- `404` — Not found
- `409` — Batch is still active. Cancel it and let it settle before deleting.

## Changes

- **2026-08-08** `182f532c2552` — 3 warning
  - added the new `WEBSITE_BLOCKED` enum value to the `error_code` response property for the response status `401`
  - added the new `WEBSITE_BLOCKED` enum value to the `error_code` response property for the response status `404`
  - added the new `WEBSITE_BLOCKED` enum value to the `error_code` response property for the response status `409`
- **2026-08-07** `3c6a01ba967f` — 3 warning
  - added the new `COLD_DOMAIN_TIMEOUT_TOO_LOW` enum value to the `error_code` response property for the response status `401`
  - added the new `COLD_DOMAIN_TIMEOUT_TOO_LOW` enum value to the `error_code` response property for the response status `404`
  - added the new `COLD_DOMAIN_TIMEOUT_TOO_LOW` enum value to the `error_code` response property for the response status `409`
- **2026-08-06** `fc8ac2f5f021` — 12 warning
  - added the new `CONTENT_TOO_LARGE` enum value to the `error_code` response property for the response status `401`
  - added the new `CONTENT_TOO_LARGE` enum value to the `error_code` response property for the response status `404`
  - added the new `CONTENT_TOO_LARGE` enum value to the `error_code` response property for the response status `409`
  - added the new `PDF_IMAGES_ONLY` enum value to the `error_code` response property for the response status `401`
  - …8 more
- **2026-07-31** `f5c503b03f98` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/context/apis/context-dev/changes/batch/:batch_id/delete.md)

---

[API](https://skmtc.dev/context/apis/context-dev.md) · [All operations](https://skmtc.dev/context/apis/context-dev/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/context/context-dev/revisions/182f532c2552/schema)
