Upload a JSONL input file for the Batch API
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; the returned file id goes in `input_file_id` when creating a batch.
Authorization
apiKey OpenRelay API key. Send it as Authorization: Bearer vl_….
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/files" \ -F file="string" \ -F purpose="batch"{
"id": "string",
"object": "file",
"bytes": 0,
"created_at": 0,
"expires_at": 0,
"filename": "string",
"purpose": "string"
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}Command line
The orl CLI wraps this endpoint:
orl files uploadOverview
Input and result files for the Batch API (JSONL, up to 200 MB and 50,000 records). Served by the inference endpoint (inference.openrelay.inc).
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.