---
title: "Delete a batch"
method: DELETE
path: "/analyze/batches/{batch_id}"
tags: ["analyzeAsync > batches"]
---

# Delete a batch

`DELETE /analyze/batches/{batch_id}`

Use this method to delete a batch and all the tasks associated with it. You can only delete batches with status `completed`, `canceled`, or `expired`.

Deleting a batch does not affect billing. You are billed for every completed analysis regardless of whether you delete the batch afterward.

To stop a batch with the `pending` or `processing` status, use the [`POST`](/v1.3/api-reference/analyze-videos/batch-analysis/cancel-batch) method of the `/analyze/batches/{batch_id}/cancel` endpoint.

Batches are deleted 30 days after creation.

## Path parameters

- `batch_id` string, required

## Headers

- `x-api-key` string, required

## Response `200`

Successful response

## Other responses

- `404` — Batch not found.
- `409` — The batch is still in a non-terminal state (`pending`, `processing`, or `canceling`) and cannot be deleted (error code `batch_not_terminal`). Cancel the batch and wait for it to reach a terminal state (`canceled`, `completed`, or `expired`) before deleting.

## Changes

- **2026-08-22** `fd9d80e384a8` — 1 breaking
  - added the pattern `^[0-9a-fA-F]{24}$` to the `path` request parameter `batch_id`
- **2026-07-26** `c0926990c662` — 1 breaking, 1 info
  - removed the success response with the status `204`
  - added the success response with the status `200`

[Change history](https://skmtc.dev/twelvelabs/apis/twelvelabs-api/changes/analyze/batches/:batch_id/delete.md)

---

[API](https://skmtc.dev/twelvelabs/apis/twelvelabs-api.md) · [All operations](https://skmtc.dev/twelvelabs/apis/twelvelabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/twelvelabs/twelvelabs-api/revisions/03b6cc37a537/schema)
