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

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.

POST
/v1/files/presign
AuthorizationBearer <token>

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"
  }
}