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.
apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
application/json- body
bytes*integerExact size of the upcoming upload in bytes (max 200 MB).
int64filename?stringDisplay name; not persisted.
OK
application/json- response
A minted file id and a signed URL for a direct browser upload.
file_id*stringFile id to register with the complete call after the PUT succeeds.
put_url*stringSigned URL; PUT the raw JSONL bytes to it.
expires_at*integerUnix timestamp (seconds) the signed URL stops working.
int64curl -X POST 'https://inference.openrelay.inc/v1/files/presign' \ -H 'Content-Type: application/json' \ -d '{ "bytes": 0}'{ "file_id": "string", "put_url": "string", "expires_at": 0}Upload a JSONL input file for the Batch API POST
Uploads a JSONL file of batch requests and returns its file object: the file id, size in bytes, purpose, and an expiry time 30 days after the upload. Send multipart/form-data with a `file` part (the JSONL bytes, up to 200 MB and 50,000 records) and a `purpose` field set to `batch`. Each line is one request object with the BatchRequestRecord shape (including the optional `openrelay.tool_config` extension on chat bodies); the returned file id goes in `input_file_id` when creating a batch.
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.