---
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

> 26 revisions in range; 16 could not be searched.

- **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/1febe5476266/schema)
