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.
Authorization
apiKey OpenRelay API key. Send it as Authorization: Bearer vl_….
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/files/presign" \ -H "Content-Type: application/json" \ -d '{ "bytes": 0 }'{
"file_id": "string",
"put_url": "string",
"expires_at": 0
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string"
}
}Upload a JSONL input file for the Batch API POST
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.
Register a presigned upload after the PUT succeeds POST
Validates the uploaded object (size, line count) and registers it as a batch input file. Idempotent; completing an already-registered id returns the existing file.