Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceInferenceFiles

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>
GET
/v1/files/{id}

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

id*string

Response Body

OK

application/json
  1. response

A file stored for the Batch API (OpenAI-compatible).

id*string

File id (file-…). Pass it as input_file_id when creating a batch.

object*"file"
Value in"file"
bytes*integer

File size in bytes.

Formatint64
created_at*integer

Unix timestamp (seconds).

Formatint64
expires_at?integer

Unix timestamp (seconds); files are retained for 30 days.

Formatint64
filename*string
purpose*string

"batch" for inputs, "batch_output" / "batch_error" for result files.

Example Request
curl -X GET 'https://inference.openrelay.inc/v1/files/string'
Example Response
{  "id": "string",  "object": "file",  "bytes": 0,  "created_at": 0,  "expires_at": 0,  "filename": "string",  "purpose": "string"}