RawFrame

Create an upload

POST
/v1/uploads

Returns a signed URL. PUT the file bytes to upload_url with the same Content-Type, then reference the upload by id. Uploads expire after 7 days.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key, e.g. rf_live_3f9k2q_….

Request Body

application/json
  1. body
content_type*string
Value in"image/png""image/jpeg""image/webp""video/mp4""video/quicktime""audio/mpeg""audio/wav"
size_bytes*integer
Range1 <= value <= 209715200
sha256?string
Match^[a-f0-9]{64}$

Response Body

Upload created.

application/json
  1. response
object*unknown
id*string
Match^upl_
status*string
Value in"pending""ready""rejected"
content_type*string
size_bytes?integer
upload_url?string

Signed PUT URL; present only while status is pending.

Formaturi
upload_url_expires_at?string
Formatdate-time
expires_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.rawframe.dev/v1/uploads' \  -H 'Content-Type: application/json' \  -d '{  "content_type": "image/png",  "size_bytes": 1}'
Example Response
{  "object": "upload",  "id": "string",  "status": "pending",  "content_type": "string",  "size_bytes": 0,  "upload_url": "http://example.com",  "upload_url_expires_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z"}