Both labs sell this product, and their terms line up closely.
Predict
You send three requests in one batch. In what order do both providers return the results?
Anthropic Message Batches API
OpenAI Batch API
Price
50 percent of standard prices
50% discount
Window
expires if not done within 24 hours
24 hours, the only window offered
Typical finish
most batches within 1 hour
often sooner than 24 hours
Per batch
100,000 requests or 256 MB
50,000 requests, 200 MB input file
Queue cap
batch requests waiting in the processing queue
prompt tokens queued per model
Matching results
custom_id, results in any order
custom_id, output order may not match input
Results kept
29 days after creation
output file deleted 30 days after completion
That's what each provider's docs said on 2026-11-06.
These numbers move. Check the docs before you quote a limit in an interview.
ANTHROPIC and OPENAI in the editor hold the per-batch limits from the table. Write batches_needed(n, bytes_each, limits): how many batches carry n requests of bytes_each bytes, when a batch ends at whichever limit it reaches first.
Pick an answer above to see the rest
Instructions
1
Write batches_needed(n, bytes_each, limits): how many batches carry n requests of bytes_each bytes, when a batch ends at whichever limit it reaches first. Take a MB as a million bytes.