Upload a file
POST
https://api.vidmoat.com/v1/media/uploadsUpload a file directly, as multipart form data, up to 32 MB per request and within your plan's upload and storage limits. For larger files, import from a URL.
Form fields#
filefilerequiredThe video, image or audio file.
Response#
Returns 201.
Response fields#
mediaobjectThe stored file.Show 7 child fields
urlstringUse as a clipsrc.filenamestringStored name.bytesintegerSize.deduplicatedbooleantruewhen you had already uploaded the same bytes; the existing file is returned.probeobject or null{ width, height, fps, duration, hasAudio }.convertedobjectPresent when video the browser cannot play (HEVC, for example) was converted:{ from, to }.warningstringPresent when that conversion failed.
hintstringWhat to do with it.
Errors#
Besides the errors any request can get (authentication, rate limits):
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | The body is not multipart, or file is missing or empty. |
| 413 | payload_too_large | Over 32 MB, or over the plan's upload cap. |
| 413 | quota_exceeded | Cloud storage on the plan is full. |