Upload

Upload an image

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.

POST
/upload
AuthorizationBearer <token>

Token-based authentication using access tokens.

In: header

filename?Filename

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

Defaultnull
project_nameProject Name

Name of the project to associate with the uploaded image. The project must already exist.

Length1 <= length <= 128

Response Body

Examples

curl -X POST "https://loading/upload" \
  -H "Content-Type: application/json" \
  -d '{
    "project_name": "string"
  }'
{
  "content_type": "string",
  "download_url": "string",
  "file_id": "string",
  "filename": "string",
  "project_id": "string",
  "project_name": "string",
  "upload_url": "string"
}
Empty