Skip to main content
Request a presigned URL to upload a file. See Uploads for the full flow and validation rules.

Request

Authorization
string
required
Bearer sk_live_...
filename
string
required
Original filename, 1–255 characters. The extension determines the content type and must be one of .mp3, .wav, .pdf, .txt, .jpg, .jpeg, .png, .webp.
size
number
required
File size in bytes (minimum 1). Checked against your plan limit: 25 MB on Free, 100 MB on Pro. The actual size is re-verified when the upload is consumed.

Response

id
string
Upload id, pass as audioId (audio jobs), imageId (image jobs), or fileId (text jobs).
uploadUrl
string
Presigned PUT URL. Valid for 15 minutes.
contentType
string
Content type derived from the extension. The PUT request must use exactly this Content-Type header.
uploadUrlExpiresIn
number
Upload URL lifetime in seconds (900).
expiresAt
string
ISO timestamp after which the upload can no longer be consumed (24 hours from creation).

Example

Then upload the file:

Errors