Download a batch file
Download the JSONL content of an input, output, or error file. Files are
kept for 7 days; an input file from its upload, and output and error
files from when the batch finishes. A file past its expires_at
returns 404 with the code file_expired.
A batch’s output file has one line for each request that succeeded,
and its error file one line for each request that did not. Each line
is {"id", "custom_id", "response", "error"}:
- A request that got an HTTP answer has
responsewith itsstatus_code, itsrequest_id(the ID its row in Account Usage carries), and thebodythe endpoint returned, anderrorisnull. A failed request’sbodyis an error body in the{"error": {"message", "type", "param", "code"}}shape. - A request that never ran has
response: nullanderrorwith acodeandmessage, for examplebatch_expiredwhen the batch expired first orbatch_cancelledwhen the batch was cancelled.
Authentication
AuthorizationBearer
Pass your EmpirioLabs API key as a bearer token. The Anthropic-style
x-api-key header is also accepted on every endpoint.
Path parameters
file_id
Id of a batch input, output or error file.
Response
JSONL file content.
Errors
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
