Skip to main content

Batch Detail

Get detailed information for a single extraction batch including item counts, provider, status, and timing. Shows per-item breakdown when the batch is completed.

Retrieve the full batch record including per-item status. Poll this endpoint while status is submitted to track progress. Once completed, each item shows its individual outcome and processing timestamp.

Use this endpoint to monitor a batch after submission. Poll periodically while status is submitted — typically results arrive within 24 hours. Once status changes to completed, failed, or cancelled, polling can stop. Use the sync endpoint to force an immediate provider check instead of waiting for the hourly poll.

The response includes items — an array of per-document results. Each item has a status (pending, processing, completed, or failed), the associated document_id and document_filename, and a processed_at timestamp. The custom_id field shows the provider-assigned identifier used when submitting to Anthropic or Bedrock.

Failed items are automatically retried via realtime extraction, never re-batched, to preserve the 48-hour SLA. Check the errored_count and expired_count fields at the batch level, and individual items[].error_message for per-document failure details. Pair with GET /v1/documents/:id to check the final extraction status of any document in the batch.

Items that fail extraction in the batch are retried via realtime extraction (never re-batched) to preserve the original 48-hour SLA. Check items[].status for per-document outcomes.
GET/v1/batches/:id

Response

Response fields

idstringBatch UUID.
statusstringBatch status: accumulating, submitted, completed, failed, or cancelled.
providerstringInference provider: anthropic or bedrock.
item_countintegerTotal number of items in the batch.
succeeded_countintegerNumber of items that completed successfully.
errored_countintegerNumber of items that errored.
expired_countintegerNumber of items that expired.
submitted_atstring | nullISO 8601 timestamp when submitted to the provider.
completed_atstring | nullISO 8601 timestamp when the batch completed.
error_messagestring | nullProvider error message if the batch failed.
created_atstringISO 8601 creation timestamp.
updated_atstringISO 8601 last update timestamp.
links.selfstringURL to this batch.
itemsarrayPer-item breakdown.
items[].idstringItem UUID.
items[].document_idstringAssociated document UUID.
items[].document_filenamestring | nullFilename of the associated document.
items[].custom_idstring | nullCustom identifier used when submitting to the provider.
items[].statusstringItem status: pending, processing, completed, or failed.
items[].error_messagestring | nullError message if this item failed.
items[].created_atstringISO 8601 creation timestamp.
items[].processed_atstring | nullISO 8601 timestamp when this item was processed.

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "completed",
  "provider": "anthropic",
  "item_count": 142,
  "succeeded_count": 142,
  "errored_count": 0,
  "expired_count": 0,
  "submitted_at": "2024-10-01T06:00:00.000Z",
  "completed_at": "2024-10-01T14:23:00.000Z",
  "error_message": null,
  "created_at": "2024-10-01T05:45:00.000Z",
  "updated_at": "2024-10-01T14:23:00.000Z",
  "links": { "self": "/v1/batches/a1b2c3d4-e5f6-7890-abcd-ef1234567890" },
  "items": [
    {
      "id": "item-uuid-1",
      "document_id": "doc-uuid-1",
      "document_filename": "invoice_2024_001.pdf",
      "custom_id": "msgbatch_abc123:0",
      "status": "completed",
      "error_message": null,
      "created_at": "2024-10-01T05:45:00.000Z",
      "processed_at": "2024-10-01T14:10:00.000Z"
    }
  ]
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundNo batch with this ID exists for your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.