Import from a URL
POST
https://api.vidmoat.com/v1/media/importFetch a public http(s) URL server-side, up to your plan's upload cap or 512 MB, whichever is smaller. Destinations pass through the SSRF guard, so private ranges and metadata endpoints are refused.
Body#
urlstringrequiredA publichttporhttpsURL to a video, image or audio file. Redirects are followed; the fetch times out after 120 seconds.
Response#
Returns 201.
Response fields#
mediaobjectThe stored file.Show 6 child fields
urlstringUse as a clipsrc.filenamestringStored name.mediaTypeenumWhat it is.One ofvideo,audio,imagecontentTypestringMIME type.bytesintegerSize.durationSecnumber or nullLength, for video and audio.
hintstringWhat to do with it.
Errors#
Besides the errors any request can get (authentication, rate limits):
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | No url, a private or unresolvable host, or a file that is not video, image or audio. |
| 413 | payload_too_large | The file is larger than the import limit. |
| 502 | provider_error | The URL could not be fetched (an upstream 404 or a timeout, for example). |