Register a file after its presigned upload
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.
Required permission
Requires the batch.write permission. See Permissions for the roles and API key permissions that include it.
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 POST 'https://inference.openrelay.inc/v1/files/string/complete'{ "id": "string", "object": "file", "bytes": 0, "created_at": 0, "expires_at": 0, "filename": "string", "purpose": "string"}Mint a signed URL for a direct JSONL upload POST
For browser clients that upload the file straight to storage instead of through the API: returns a file id and a signed PUT URL (valid 15 minutes). After the PUT succeeds, register the file with the complete call. CLI and SDK clients should use the plain upload instead.
Get a file's metadata GET
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.