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

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.

POST
/v1/files/{id}/complete

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 POST 'https://inference.openrelay.inc/v1/files/string/complete'
Example Response
{  "id": "string",  "object": "file",  "bytes": 0,  "created_at": 0,  "expires_at": 0,  "filename": "string",  "purpose": "string"}