[ ABORT TO HUD ]
SEQ. 1

JSONL Construction & Callbacks

📦 Batched API Optimization20 min1300 BASE XP⌨ HANDS-ON LAB

Enterprise-Scale Processing

For large-scale tasks (ETL, bulk summarization, offline evals) that do not require immediate synchronous responses, Anthropic provides the Message Batches API (POST /v1/messages/batches). You submit a batch of requests in JSONL format, each tagged with a unique custom_id.

The 50% Cost Discount

Because the Message Batches API allows Anthropic to optimize GPU cluster scheduling during non-peak windows, Anthropic offers a flat 50% discount on both input and output tokens. Batches are processed asynchronously within a 24-hour SLA.

⌨ HANDS-ON LABSubmit & Poll a Message Batch
⭐ +200 XP

Two thousand support tickets need summarizing overnight. Submit a Message Batch with custom_ids, poll its status, then pull the JSONL results - at 50% token cost.

1POST two requests (each with a unique custom_id) to the Message Batches endpoint.
2Poll the batch by GETting its ID until processing_status flips to ended.
3Stream the .jsonl results - one line per request, matched back to your inputs by custom_id.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 3 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 3
What is the token cost savings when using the Message Batches API?
10% discount
50% discount on all input and output tokens
75% discount
It is free