RelayAPI

Get a pre-signed upload URL

Create a pending media upload intent and generate a create-only pre-signed R2 PUT URL. Send every header in upload_headers exactly as returned, including Content-Type and If-None-Match, then call POST /v1/media/confirm; confirmation is mandatory before using the canonical media URL.

POST
/v1/media/presign
AuthorizationBearer <token>

API key (rlay_live_* or rlay_test_). Invite redemption also accepts a server-derived rlay_session_ bearer for a current user session.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/media/presign" \  -H "Content-Type: application/json" \  -d '{    "content_type": "string",    "filename": "string"  }'
{  "expires_in": 0,  "id": "string",  "upload_headers": {    "Content-Type": "string",    "If-None-Match": "*"  },  "upload_url": "http://example.com",  "url": "http://example.com"}

Found something wrong? Help us improve this page.