Create a presigned upload URL for an input file

Request a short-lived S3 PUT URL and a task ID for an image or video file. PUT the bytes to uploadUrl with the same Content-Type, then pass the task ID to createJob.

Authentication

AuthorizationBearer

Unrestricted secret sk_live_... or Cognito access token in Authorization: Bearer ...

Request

This endpoint expects an object.
contentTypestringRequiredformat: "^(image/[^;\s]+|video/[^;\s]+|application/octet-stream)$"

An image or video MIME type, or application/octet-stream.

Response

Presigned upload URL and object key
uploadUrlstringformat: "uri"
taskIdstringformat: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[a-z0-9][a-z0-9.-]{0,63}$"

Opaque upload id. Includes the file extension so create-job can address the object without listing the inputs prefix (for example a1b2c3d4-e5f6-7890-abcd-ef1234567890.png).

bucketstring
expiresIninteger

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error