import media
Bring media into the library. The user’s files come in by link, one handed over in conversation included; a file the caller made or fetched itself is file or presign; a public address is url; one on the desktop app’s computer is local, or link when the path is unknown. url: files or public Drive or Dropbox file links, up to 20 a call, deduped by content; caps 20MB image, 200MB video, 50MB audio, 25MB document. A download past about 20 seconds continues as queued with its job_id; get_jobs carries the item when ready. file: bytes in the call, base64, up to 3MB. link: a page the user opens to add files from a computer or phone; folder and timeline say where they go; anyone in the workspace with the link can use it; search_library upload_link with its link_id lists what came through it. Through the desktop app, link also brings the app forward on that page (opened), media not uploaded; url is for a phone. presign: one signed URL per file for the caller to PUT, for the exact size, good for an hour; confirm registers them, up to 20 a call. local: absolute paths, nothing uploaded. Free; a stored file’s search vectors use cloud processing.
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 default: for a key or a connected agent, one of the workspaces the user allowed it.
Body
url (a public web address), file (bytes in the call), link (the user uploads it), presign (the caller PUTs up to 5 GB; larger by link), confirm (after the presign PUT), local (paths on the desktop app's computer).
url, file, link, presign, confirm, local mode url: the media to save.
1 - 20 elementsmode file: the bytes, up to 3MB 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: 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.
url, file and confirm: also start these reads on the items that landed, as prepare_media does; the result carries prepared, with job_ids. Cloud processing.
1transcript, search_index, speech, speakers, beats, levels Optional: one sentence shown to the user beside this action.
600
