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

---

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