import media
Bring media into the library, by mode. url: hosted files, up to 20 a call, deduped by content, each reported as imported, duplicate or failed; caps 20MB image, 200MB video, 50MB audio, 25MB document. A download that has not finished in about 20 seconds continues in the background and is reported as queued with its job_id; get_jobs carries the item when it is ready. file: bytes in the call, base64, up to 6MB. link: a page the user opens to drop files from their own computer; folder and timeline say where they go, from puts the caller’s name on the page; anyone in the workspace holding the link can use it; search_library finds the files once they have arrived. presign: one signed URL per file for the caller to PUT itself, signed for the exact size, good for an hour; confirm registers the uploads as items, up to 20 a call. local: through the desktop app only, absolute paths on that computer, added as items at once with nothing uploaded. A file on the user’s computer is link (or local through the app); a file the caller holds is file or presign. Free.
Authorizations
An API key (es_live_…) from Settings, under API keys, or an OAuth access token.
Headers
Retry a paid dispatch safely: the same key returns the job already dispatched instead of charging again.
The workspace this one call acts in, when it is not the key's own.
Body
url (hosted media), file (bytes in the call), link (the user has the file), presign (the caller PUTs up to 5 GB; larger by link), confirm (after the presign PUT), local (paths on the computer running the desktop app).
url, file, link, presign, confirm, local mode url: the media to save.
1 - 20 elementsmode file: the bytes, up to 6MB decoded.
mode presign: one entry per file. The URL is signed for exactly the size declared; a PUT of any other length is refused.
1 - 20 elementsmode confirm: the upload_id values presign returned, up to 20 a call.
1 - 20 elementsmode confirm: per-upload knowledge, matched by upload_id.
mode link: your name, as the user knows you ("Claude"). The page tells them who to go back to once the files are up.
40mode link: timeline id; each file is also added to it as a clip, after the last one.
Folder path or id to land in. Without one, files go to the workspace's Uploads folder.
Optional: one sentence shown to the user beside this action.
600
