Skip to main content
POST
/
api
/
v1
/
upload
Upload a media file
curl --request POST \
  --url https://mallary.ai/api/v1/upload \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>"
}
'
{
  "url": "<string>",
  "contentType": "image/jpeg",
  "size": 123,
  "publicUrl": "<string>",
  "headers": {}
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer {api_key}

Body

application/json
url
string<uri>
required

Public URL of the media file to ingest.

Response

Upload URL generated

url
string<uri>

Presigned URL to PUT the file to storage

contentType
enum<string>

MIME type that should be sent when posting.

Available options:
image/jpeg,
image/jpg,
image/png,
image/webp,
image/pjpeg,
image/gif,
image/bmp,
video/mp4,
video/quicktime,
video/webm,
video/x-matroska,
video/x-msvideo,
video/mpeg
size
integer

File size in bytes (echoed from request)

publicUrl
string<uri>

Public URL to include in the media array for posting

headers
object