v3

latestOpenAPI 3.1.02026-08-016689273.4 KB
File Uploads

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.

post/uploads/prepare

Request body

filenamestring required

Original filename, including extension.

mimetypestring required

MIME type of the file (e.g., image/jpeg, video/mp4).

sizeinteger required

File size in bytes.

Response

Signed credentials for uploading the file

idstring uuid required

Upload job ID. Use this to poll GET /uploads/{id}.

status'awaiting_upload' required

Initial status while Ordinal waits for the file POST.

uploadUrlstring uri required

URL to POST the file to as multipart form data.

paramsstring required

Signed upload params. Include verbatim as the params form field.

signaturestring required

Signature for the params. Include verbatim as the signature form field.

expiresAtstring date-time required

Time after which the signed credentials are no longer valid.

createdAtstring date-time required