Skip to navigation

List batch files

Lists your batch input, output, and error files, newest first unless order is asc. A page holds at most 100 files: while has_more is true, pass the page’s last_id as after to get the next. Filter with purpose: batch for input files, batch_output for output and error files.

Authentication

AuthorizationBearer

Pass your EmpirioLabs API key as a bearer token. The Anthropic-style x-api-key header is also accepted on every endpoint.

Query parameters

limitintegerOptional1-10000Defaults to 10000
Maximum number of files to return, 1 to 10,000. A page holds at most 100.
orderenumOptionalDefaults to desc

Sort order by creation time: desc (newest first) or asc.

Allowed values:
afterstringOptional

A file id, usually the previous page’s last_id; return the files after it.

purposestringOptional

Only files with this purpose: batch or batch_output. Any other value returns an empty list.

Response

File list.
objectstringOptional
datalist of objectsOptional
first_idstring or nullOptional
The id of the first file on this page.
last_idstring or nullOptional

The id of the last file on this page. Pass it as after for the next page.

has_morebooleanOptional
Whether more files follow this page.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error