Skip to main content
POST
Request a file upload URL

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
content_type
string
required

MIME type of the file you will upload.

Example:

"video/mp4"

filename
string | null

The file's original name. Sets the stored object's extension and is kept as the asset's display name; without it the asset shows as its uuid key.

Example:

"my-clip.mp4"

duration
number | null

Optional client-probed media duration in seconds — video and audio only; ignored for images, which have no duration. When provided, the asset is immediately usable/listable instead of waiting on server-side metadata extraction; the server probe (when it runs) overrides it.

Example:

12.5

width
integer | null

Optional client-probed pixel width (video or image).

Example:

1920

height
integer | null

Optional client-probed pixel height (video or image).

Example:

1080

content_base64
string | null

The file's bytes, base64-encoded, to store in this same call. Use it when you cannot reach storage.googleapis.com — a sandboxed agent whose egress is allow-listed per host, typically. The response then carries uploaded: true and a null upload_url, and source_url is usable right away. Capped at 256 KB; larger files must use upload_url. A data: prefix, line wrapping and the URL-safe alphabet are all accepted.

Response

Successful Response

Response from POST /v1/uploads.

source_url
string
required

CDN URL for the uploaded file. Pass this as source_url in render/task requests.

Example:

"https://cdn-user.framelane.io/uploads/ws_01J.../a1b2c3.mp4"

expires_at
string<date-time>
required

When the upload_url expires (1 hour from now).

upload_url
string | null

GCS resumable upload URL. PUT your file bytes here with the correct Content-Type. null when you sent content_base64: the bytes are already stored, so there is no slot left to fill.

Example:

"https://storage.googleapis.com/framelane-prod-user/uploads/ws_01J.../a1b2c3.mp4?upload_id=..."

uploaded
boolean
default:false

True when this call also stored the file (you sent content_base64), so source_url is usable immediately. False means only a slot was minted and the bytes are still yours to PUT.

asset_id
string | null

The media asset registered for this upload — poll it with GET /v1/workspace/assets/{id}. Null for fonts, which are storable but are not timeline media and so get no asset row.

Example:

"asset_01J8QR2K5VKDGN2T4FBM3CZYX7"

first_party_upload_url
string | null

The same upload session as upload_url, on a Framelane hostname. Use it when your network allows *.framelane.io but not storage.googleapis.com — same protocol, same chunks, same expiry. Null when you sent content_base64, or when this deployment has no first-party upload host.

Example:

"https://uploads.framelane.io/s/AAECAwQFBgcICQoL…"