---
title: "Retrieve batch status"
method: GET
path: "/analyze/batches/{batch_id}"
tags: ["analyzeAsync > batches"]
---

# Retrieve batch status

`GET /analyze/batches/{batch_id}`

Use this method to monitor a batch. The response includes the current batch status and counts for queued, processing, ready, failed, and canceled items.

Poll this method until the batch reaches the `completed`, `canceled`, or `expired` status. To retrieve the results, call the [`GET`](/v1.3/api-reference/analyze-videos/batch-analysis/retrieve-batch-results) method of the `/analyze/batches/{batch_id}/results` endpoint.

Do not treat the `completed` status as a success signal. It means processing has finished for every item, not that every analysis succeeded. To see how many items succeeded, failed, or were canceled, check the `ready_items`, `failed_items`, and `canceled_items` fields. A batch never has the `failed` status.

## Path parameters

- `batch_id` string, required

## Headers

- `x-api-key` string, required

## Response `200`

Batch status retrieved successfully. The response includes batch details and item counts for each item status.

- AnalyzeBatchStatusResponse — A batch object that includes item counts for each item status.
  - `batch_id` string, required — The unique identifier of the batch. Use this value to retrieve the batch status or results.
  - `analysis_mode` 'general' | 'time_based_metadata', required — The analysis mode applied to every item in this batch.
  - `model_name` string, required — The model used for every item in this batch.
  - `status` 'pending' | 'processing' | 'canceling' | 'canceled' | 'completed' | 'expired', required — The status of a batch. For the meaning of each value, see the [Batch statuses](/v1.3/api-reference/analyze-videos/batch-analysis/the-batch-object#batch-statuses) section on the **The batch object** page.
  - `total_items` integer, required — The number of items submitted in the batch.
  - `created_at` string, date-time, required — The date and time, in the RFC 3339 format, when the batch was created.
  - `expires_at` string, date-time, required — The date and time, in the RFC 3339 format, when the batch expires (the `created_at` field value plus 24 hours). Unfinished items at expiration are canceled. Items that finished before then remain retrievable for 30 days after creation, when the batch and its results are deleted.
  - `completed_at` string, date-time — The date and time, in the RFC 3339 format, when the batch status became `completed`. Present only when the status is `completed`.
  - `canceled_at` string, date-time — The date and time, in the RFC 3339 format, when the batch status became `canceled`. Present only when the status is `canceled`.
  - `expired_at` string, date-time — The date and time, in the RFC 3339 format, when the batch status became `expired`. Present only when the status is `expired`.
  - `queued_items` integer, required — The number of items in the `queued` status.
  - `processing_items` integer, required — The number of items in the `processing` status.
  - `ready_items` integer, required — The number of items that completed successfully.
  - `failed_items` integer, required — The number of items that failed.
  - `canceled_items` integer, required — The number of items that were canceled, either because the batch was canceled while the item was in the `queued` status, or because the batch expired before the item finished processing.
  - `webhooks` AnalyzeTaskWebhookInfo[] — The delivery status of each webhook endpoint for the batch completion notification. Present only after the platform sends the webhook notifications. To register webhooks, see the [Webhooks](/v1.3/docs/advanced/webhooks) page.
    - `url` string, uri, required — The URL of the webhook endpoint that received the delivery.
    - `delivered` boolean, required — Indicates whether the platform successfully delivered the webhook.
    - `attempts` integer, required — The total number of delivery attempts for this URL.
    - `last_error` string — The error message from the last failed delivery attempt. This field appears only when `delivered` is `false`.

## Other responses

- `404` — Batch not found.

---

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