---
source: https://iinventedlight.com/library/notes/ao-batch-apis-openai-and-anthropic.md
title: "Batch APIs: OpenAI Batch and Claude Message Batches"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (openai/openai-cookbook (GitHub)); MIT (anthropics/claude-cookbooks (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: openai/openai-cookbook (GitHub), Batch processing with the Batch API, MIT (https://raw.githubusercontent.com/openai/openai-cookbook/main/LICENSE). Copyright (c) 2025 OpenAI; anthropics/claude-cookbooks (GitHub), Batch processing, MIT (https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/LICENSE). Copyright (c) 2023 Anthropic."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Docs read; no API call was made for this note."
category: agent-operations
topic_area: "agent operations: retries and rate limits"
tags: [batch, openai, anthropic, async, cost]
client: Librarian
sources:
  - id: S1
    title: "Batch processing with the Batch API"
    publisher: openai/openai-cookbook (GitHub)
    url: https://github.com/openai/openai-cookbook/blob/main/examples/batch_processing.ipynb
    accessed: 2026-11-16
    license: "MIT"
  - id: S2
    title: "Batch processing"
    publisher: anthropics/claude-cookbooks (GitHub)
    url: https://github.com/anthropics/claude-cookbooks/blob/main/misc/batch_processing.ipynb
    accessed: 2026-11-16
    license: "MIT"
---
# Batch APIs: OpenAI Batch and Claude Message Batches
**Answer:** The Batch API lets you create async batch jobs.

Message Batches process large volumes of Messages requests asynchronously.

| | OpenAI Batch API | Claude Message Batches |
|---|---|---|

| Status | completed within 24h, may be processed sooner | monitor batch processing status |
| Request | same parameters as Chat Completions | `custom_id` plus `params` per request |

## Claude flow

1. Build a list of requests, each with a `custom_id` and `params` (`model`, `max_tokens`, `messages`).
2. Submit with `client.beta.messages.batches.create(requests=...)`.
3. Monitor with `retrieve(batch_id)` until the status is `"ended"`; request counts show succeeded and errored.

## OpenAI flow

The cookbook notes that multiple models are available through the Batch API, with the same parameters as the Chat Completions endpoint. Good fits include tagging content, categorizing support tickets and summarizing collections of documents.

## See also

- [ao-retries-exponential-backoff](https://iinventedlight.com/library/notes/ao-retries-exponential-backoff/)
- [ao-cost-token-usage-tracking](https://iinventedlight.com/library/notes/ao-cost-token-usage-tracking/)
- [ao-retries-sdk-defaults](https://iinventedlight.com/library/notes/ao-retries-sdk-defaults/)

## Claims

- id: C1
  claim: OpenAI batches finish within 24h.
  source: S1
  evidence: "Batches will be completed within 24h"

- id: C2
  claim: Claude batches reduce cost by 50%.
  source: S2
  evidence: "while reducing costs by 50%"

- id: C3
  claim: Each Claude request has a custom_id.
  source: S2
  evidence: "\"custom_id\": f\"question-{i}\","

## Sources

- [S1] Batch processing with the Batch API. openai/openai-cookbook (GitHub). https://github.com/openai/openai-cookbook/blob/main/examples/batch_processing.ipynb . License: MIT. Accessed 2026-11-16.

- [S2] Batch processing. anthropics/claude-cookbooks (GitHub). https://github.com/anthropics/claude-cookbooks/blob/main/misc/batch_processing.ipynb . License: MIT. Accessed 2026-11-16.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: openai/openai-cookbook (GitHub), Batch processing with the Batch API, MIT (https://raw.githubusercontent.com/openai/openai-cookbook/main/LICENSE). Copyright (c) 2025 OpenAI; anthropics/claude-cookbooks (GitHub), Batch processing, MIT (https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/LICENSE). Copyright (c) 2023 Anthropic. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
