Skip to main content
POST
Reserve an upload

Authorizations

Authorization
string
header
required

Use a key created in the Playground. Keys begin with gk_.

Body

application/json
content_type
enum<string>
required

Only MP4 is accepted.

Available options:
video/mp4
size_bytes
integer
required

Exact size of the file you are about to send. It is signed into the grant, so the storage endpoint refuses a body that exceeds it -- an understated size fails the PUT rather than the reservation.

Required range: 1 <= x <= 52428800
content_hash
string

SHA-256 of the bytes, hex. Optional, and worth sending: when we already hold this exact content the response says skip_upload and there is nothing to transfer.

Pattern: ^[0-9a-f]{64}$
duration_sec
number

Optional metadata recorded on the video.

width
integer

Optional metadata recorded on the video.

Required range: x >= 1
height
integer

Optional metadata recorded on the video.

Required range: x >= 1

Response

Upload reserved, or an existing copy matched.

video_id
string
required

Reference this as the evaluation's video.upload_id, once the video reaches ready.

cdn_url
string<uri>
required

Where the bytes will be readable once the upload completes.

upload_path
string

Where to PUT the bytes. A path or absolute URL on separate storage infrastructure, valid for 15 minutes, carrying its own signed grant -- send no Authorization header with it. Absent when skip_upload is true.

skip_upload
boolean

Present and true when content_hash matched content we already hold. Skip straight to referencing video_id: there is nothing to upload and no completion call to make.