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

# Delete a batch

`DELETE /batches/{id}`

Deletes a batch in a terminal status (`completed`, `failed`, `expired`, or `cancelled`) and its stored requests and results. Batches still in progress return `409`. Billing and usage records are kept. See the [Batch API Quickstart](https://openrouter.ai/docs/batch-quickstart).

## Path parameters

- `id` string, required — The batch job id returned from submit.

## Response `200`

The batch was deleted; per-target outcomes are reported under `deletion`.

- BatchDeletedObject — Confirms a terminal batch was removed from the API and its OpenRouter-held artifacts purged. Deletion is not cancellation and does not erase billing or audit records.
  - `deletion` BatchDeletionTargets, required — OpenRouter cleanup and, when a provider was assigned, the upstream batch deletion outcome.
    - `openrouter` 'deleted', required — OpenRouter-held request and result artifacts were purged.
    - `upstream` object — The upstream batch deletion outcome; omitted when no provider was assigned.
      - `provider` string, required — The provider name stored on the batch.
      - `status` 'deleted' | 'unsupported' | 'not_applicable', required — Outcome for one deletion target: `deleted` (removed), `unsupported` (the provider has no batch-delete API; supported file cleanup still runs), or `not_applicable` (the batch never reached that target).
  - `id` string, required
  - `object` 'batch', required

## Other responses

- `401` — Missing or invalid API key.
- `404` — No batch exists for the given id.
- `409` — The batch is still processing, its required provider key is unavailable, or its state changed during deletion.
- `429` — Batch API rate limit exceeded for the billable entity.
- `500` — Unexpected error in the ingress or upstream batch-api.
- `502` — The batch service is unavailable, or an upstream provider operation failed, including batch or file cleanup.

## Changes

- **2026-09-25** `024c455cb825` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/batches/:id/delete.md)

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) · [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openrouterteam/apis/openrouter-api/revisions/31b1cd25caca?raw)
