Skip to navigation

Retrieve a batch file

Returns a batch input, output, or error file’s details. A file past its expires_at returns 404 with the code file_expired.

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_idstringRequired
Id of a batch input, output or error file.

Response

The file.
idstringOptional
objectenumOptional
Allowed values:
bytesintegerOptional
Size of the file in bytes.
created_atintegerOptional
Unix time in seconds when the file was created.
expires_atinteger or nullOptional

Unix time in seconds when the file expires. After it, the file returns 404 with the code file_expired.

filenamestringOptional
purposeenumOptional

batch for an input file you uploaded, batch_output for a batch’s output and error files.

Allowed values:
statusstringOptional

processed: the file is stored and ready to use.

line_countintegerOptional
Number of request lines in the file.

Errors

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