Get a file's metadata
Returns a file's metadata (id, size in bytes, purpose, and creation and expiry times) for a batch input or result file, without its content. The filename is assigned by the server, not the name you uploaded.
Required permission
Requires the batch.read permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl files get <id>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
id*stringOK
application/json- response
A file stored for the Batch API (OpenAI-compatible).
id*stringFile id (file-…). Pass it as input_file_id when creating a batch.
object*"file""file"bytes*integerFile size in bytes.
int64created_at*integerUnix timestamp (seconds).
int64expires_at?integerUnix timestamp (seconds); files are retained for 30 days.
int64filename*stringpurpose*string"batch" for inputs, "batch_output" / "batch_error" for result files.
curl -X GET 'https://inference.openrelay.inc/v1/files/string'{ "id": "string", "object": "file", "bytes": 0, "created_at": 0, "expires_at": 0, "filename": "string", "purpose": "string"}Register a file after its presigned upload POST
Validates an object uploaded to a presigned URL (size, line count) and registers it as a batch input file, returning the file object to use in a batch. Idempotent; completing an already-registered id returns the existing file.
Download a file's raw JSONL content GET
Streams a file's raw bytes as application/octet-stream, for a batch input file you uploaded or a result file that a batch has written. Use it to fetch batch results: the batch object's output_file_id (successful records) and error_file_id (failed records) each point at a JSONL file of `{custom_id, response | error}` lines.