AI GLOSSARY · AI CONCEPTS

Batch API

Markdown version

Definition

A Batch API accepts groups of independent model requests for asynchronous processing and later retrieval. OpenAI calls its product Batch API; Anthropic calls its product Message Batches API.

Also called: OpenAI Batch API, Message Batches API.

In plain language

A Batch API is useful when many requests can wait, such as an evaluation or bulk classification job. You submit independent requests, monitor the asynchronous job, and retrieve results after processing. It is unsuitable for a request path that needs an immediate answer. Costs, throughput, limits, storage, completion windows, supported request types, and result formats are provider-specific and should be checked before each implementation.

Technical definition

OpenAI’s Batch API uses a JSONL input file whose lines contain a unique custom_id, HTTP method, endpoint URL, and request body, then exposes output and error files. Anthropic’s Message Batches API accepts requests with unique custom_id values and standard Messages parameters, processes them independently, and exposes results after processing. The identifiers let an application associate returned records with submitted work; no input-order guarantee is asserted here.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    llm-cost-estimator 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A calculator that applies a user-supplied, dated price table to an LLM usage profile, including an optional batch share.
    Why it exercises the concept
    It can compare batch-eligible and synchronous workload shares without embedding fixed prices. It performs cost arithmetic only; it does not submit, monitor, or validate a provider batch.

How it shows up when you use agents

A Batch API is an asynchronous execution mode for many independent model requests. It fits work such as an evaluation set, bulk classification, repository embedding, or a collection of document analyses when no user is waiting for each individual response. It does not fit a request path that must return an immediate conversational answer, although a developer may still submit or monitor a batch while working in an interactive session.

The two cited products have different contracts. OpenAI documents a JSONL input file, a batch job, status checks, and output or error files. Anthropic documents a Message Batch containing independent Messages requests, status polling, and later result retrieval. Both require a unique custom_id for each submitted request. Use that identifier to associate a result with your own record; this entry does not assert a cross-vendor guarantee about result order.

Before choosing batch processing, divide the workload into work that can wait and work that cannot. Then inspect the current provider documentation for completion windows, supported request types, limits, storage behavior, rate limits, and pricing. These are product settings, not permanent properties of the general concept. Prompt caching may be available alongside batch processing under provider-specific rules, but it is a separate mechanism and should be evaluated separately.

Common confusions

  • Batch API versus streaming. Streaming returns portions of one response as they become available. A Batch API accepts many requests for asynchronous processing and later collection.
  • Batch API versus a larger prompt. Combining tasks in one prompt creates one model request. A batch contains separate requests that are processed independently.
  • Batch API versus batch size. Batch size is the number of examples or requests processed together by a training or inference implementation. A Batch API is a provider-facing job interface for asynchronously submitted requests.
  • Batch processing versus rate limits. Providers document different limit models. OpenAI describes queued-token capacity separate from standard per-model limits, while Anthropic documents limits on batch HTTP requests and requests waiting for processing.
  • Batch processing versus guaranteed savings or timing. Vendor pages may state current discounts, throughput, or completion windows. Treat those as changeable product terms and confirm them before budgeting or designing a deadline-sensitive workflow.

More in AI concepts

Next steps

  1. llm-cost-estimator A skill that exercises it.
  2. Inference Related term.
  3. Rate limit Related term.
  4. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; revisions: OpenAI Codex (configured gpt-5.6-sol); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example/alias correction review closed with transparent bounded followups and simulated-reader blocker closure. Cached broad US definition demand; AI-exclusive share unmeasured. Final runtime gate separate; publication disabled.
  • : Private correction of independent source/example/alias and reader findings; exact-version closure and runtime gates pending. Cached broad US definition demand, not AI-exclusive traffic.
  • : First version.
  • : Verifier pass: corrected claims against sources.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.