Prepare a local file upload
Creates an upload job and returns signed credentials so you can POST a local file directly to the returned uploadUrl. After preparing, POST the file to uploadUrl as multipart form data with the returned params, signature, and file fields, then poll GET /uploads/{id} until status is ready.
See File uploads for a full walkthrough and curl examples.
Supported file types:
- Images: JPEG, PNG, GIF, WebP
- Videos: MP4, QuickTime (MOV)
File size limits:
- Images: 10 MB max
- GIFs: 15 MB max
- Videos: 350 MB max
The returned credentials are short-lived. Upload the file before expiresAt.
/uploads/prepareAuthorizationBearer token · headerrequiredAPI key authentication. Generate an API key from your workspace settings.
application/jsonfilenamestringrequiredOriginal filename, including extension.
mimetypestringrequiredMIME type of the file (e.g., image/jpeg, video/mp4).
sizeintegerrequiredFile size in bytes.
Signed credentials for uploading the file
idstring<uuid>requiredUpload job ID. Use this to poll GET /uploads/{id}.
statusstringrequiredInitial status while Ordinal waits for the file POST.
awaiting_uploaduploadUrlstring<uri>requiredURL to POST the file to as multipart form data.
paramsstringrequiredSigned upload params. Include verbatim as the params form field.
signaturestringrequiredSignature for the params. Include verbatim as the signature form field.
expiresAtstring<date-time>requiredTime after which the signed credentials are no longer valid.
createdAtstring<date-time>requiredBad Request - Invalid input parameters
codestringmessagestringdataobjectShow propertiesHide properties
errorsobjectUnauthorized - Missing or invalid API key
codestringmessagestringToo Many Requests - Rate limit exceeded
codestringmessagestring