Batch

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.

delete/batches/{id}

Request

  • Base URL
    https://openrouter.ai/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string required

The batch job id returned from submit.

Example:batch_abc123

Response

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

BatchDeletedObject required

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.

id, string required
object, 'batch' required

Example response

{
  "deletion": {
    "openrouter": "deleted",
    "upstream": {
      "provider": "OpenAI",
      "status": "unsupported"
    }
  },
  "id": "batch_abc123",
  "object": "batch"
}

Changes