Collecting results from a Message Batches API job in progress

CCDV-F Applications & Integration Medium Question 54 of 105

A data engineering team submits 6,500 product-manual translations with the Message Batches API and gets back a batch object with an ID and a processing_status of in_progress.

How should the pipeline collect the translations?

Show answer and explanation

APoll the batch until processing_status is ended, then stream the results_url JSONL

processing_status starts at in_progress and moves to ended once every request has finished, at which point results_url points at a JSONL file the client streams back. Holding the create connection open reads nothing, because batches process asynchronously and the call returns immediately. custom_id matches a result line to its request inside that file; it is not addressable on the Messages API. The batch object carries results_url, null until the end, and never inlines the results themselves.

Source: platform.claude.com/docs/en/build-with-claude/batch-process…

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 105 original CCDV-F practice questions