Skip to content
Get your keyGet a key

Reference · Files

POST/files

Upload a file, or bring one in from a public link

A file for the creates: a picture, a clip or a recording. Send it as a form (field file; pictures up to 8 MB, recordings 15 MB, clips 200 MB, 100 MB through our edge), or bring one in from a public https link with JSON. Either way it is checked as an upload on the site is, kept in the account's Library, and answered with its storage key: the …Keys and …Key fields of the creates take it.

Key needs
create · Make things and spend credits
Spends
Nothing
Answers
Data
Request
curl -X POST https://vessero.com/api/v1/files \
  -H "Authorization: Bearer $VESSERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/products/linen-shirt.jpg",
    "as": "image"
  }'
Response201 Created
{
  "object": "file",
  "key": "ai-video/uploads/2f6c1a9e-4b3d-4c8e-9a7f-1e2d3c4b5a69/6b1f0e2d-3c4a-4b5d-8e9f-0a1b2c3d4e5f.jpg",
  "kind": "image",
  "name": "linen-shirt.jpg",
  "mimeType": "image/jpeg",
  "sizeBytes": 482113
}

Body

  • urlstring · httpsrequiredA public https link to the file itself.
  • asstringrequiredWhat it is: the link is refused when it is something else.imagevideoaudio

Answers

  • 201fileKept: its storage key, for the creates.
  • 413payload_too_largeThe body is larger than the address takes.
  • 422content_refusedThe content check refused it.
  • 400refusedRefused, in the app’s words: see the message.
Next in FilesPOST/share-links