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

Mint a signed URL for a direct JSONL upload

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.

Required permission

Requires the batch.write permission. See Permissions for the roles and API key permissions that include it.

POST
/v1/files/presign

Authorization

apiKey
headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
bytes*integer

Exact size of the upcoming upload in bytes (max 200 MB).

Formatint64
filename?string

Display name; not persisted.

Response Body

OK

application/json
  1. response

A minted file id and a signed URL for a direct browser upload.

file_id*string

File id to register with the complete call after the PUT succeeds.

put_url*string

Signed URL; PUT the raw JSONL bytes to it.

expires_at*integer

Unix timestamp (seconds) the signed URL stops working.

Formatint64
Example Request
curl -X POST 'https://inference.openrelay.inc/v1/files/presign' \  -H 'Content-Type: application/json' \  -d '{  "bytes": 0}'
Example Response
{  "file_id": "string",  "put_url": "string",  "expires_at": 0}