Upload

Upload an image

POST
/upload

Generate a pre-signed S3 URL for uploading an image. The output upload_url must be used to PUT an image.

Example upload request (values taken from the /upload response):

PUT /upload/<signed-url>Content-Type: <content_type><binary-image-data>

The file_id can be used to start a batch job through the images field.

Authorization

token_auth
headerAuthorizationBearer <token>

Token-based authentication using access tokens.

Request Body

application/json
  1. body
filename?|

Original filename of the uploaded image. If left empty, a random UUID will be used.

Defaultnull
tag_ids?array<string>

IDs of existing, visible tags to assign to the newly created asset.

Default[]
new_tags?array<>

New tags to create (owned by the caller) and assign to the newly created asset.

Default[]

Response Body

Successful Response

application/json
  1. response
upload_url*Upload Url

Pre-signed URL for uploading the image (PUT).

download_url*Download Url

URL to download the uploaded image.

file_id*File Id

Unique file ID on our storage.

filename*Filename

Original file name.

content_type*Content Type

MIME type of the uploaded file. Must be supplied in the PUT request to upload the image in the header Content-Type.

curl -X POST "https://example.com/upload" \  -H "Content-Type: application/json" \  -d '{}'
{  "upload_url": "string",  "download_url": "string",  "file_id": "string",  "filename": "string",  "content_type": "string"}