The CLI’s
vidjutsu upload <file> and the SDK’s upload() do a direct upload for you. vidjutsu ingest <https-url> adds from a link.
What you get back
Every way returns the same thing:- The media id comes from the file name:
take1.movbecomestake1. Name files the way you want to refer to them in edits. - A video with sound also returns
audio: its sound as separate audio media (take1-audio), so you can place picture and sound on their own tracks. - Pass the
media(andaudio) objects to anadd_mediaedit to use them in a project. - Files are stored as uploaded, by content hash. Footage that isn’t constant-frame-rate H.264 (phone video, ProRes, screen recordings) is converted at render time, only the parts a render uses, and the conversion is cached for later renders (
conform_at_render: true). - Uploading the same bytes twice stores them once.
Direct uploads
The bytes go from you to storage by presigned links, never through the API, in parts you can send in parallel and retry one at a time.1
Start the upload
Send the file’s name, exact length and SHA-256 (64 lowercase hex digits).If
already_stored is true, those bytes are already in your library: skip to step 3 and complete with {}.2
PUT each part
Every part is exactly
part_size bytes (64 MiB for most files), and the last part is the rest. PUT each part’s bytes to its url and keep the ETag header from each response. A failed part can be sent again. The links work for 6 hours (expires_at, Unix seconds).3
Complete it
Send every part’s number and ETag, in order.The stored bytes are checked against the SHA-256 you sent (a mismatch stores nothing and is a 400), then the file is added to your library. The answer is the same as adding from a link. Completing again returns the same answer. Checking the hash reads the whole file, so a very large file takes a minute or so to complete.
DELETE /uploads/{upload_id} abandons an upload and the parts sent so far.
Adding from a link
The link must behttps:// to a named host: no IP addresses, localhost or credentials in the URL, and redirects are not followed. A presigned link from your own storage works. name is optional and defaults to the link’s last path part.
Where a file came from
POST /media and completing an upload take an optional source: where the file came from, for example {"type": "hyperframes", "project": "intro-card", "version": 3}. A project’s files list shows it, so an agent knows what to edit to remake the file. Send project too, and that project’s open editors show the upload and its progress.
Previews and transcripts
Two background jobs turn a stored file into what the editor and agents read:
Each is billed by the box time it uses (pricing), and made once per file: asking again while one exists or is being made answers
started: false and costs nothing. Otherwise the answer is a job: poll GET /jobs/{job_id}, then read the result, which is free:
GET /media/{hash}/preview and GET /media/{hash}/transcript report a state (none, pending, ready or failed) and, when ready, time-limited links. A transcript’s words.url is a JSON array of words with start and end seconds. The CLI does both steps and waits: vidjutsu transcript <hash> and vidjutsu preview <hash>.
Transcripts are what timeline words and word search read.
Download links
GET /media/{hash}/url?ttl=3600 returns a time-limited link to any stored file, including finished renders. ttl is in seconds, from 60 to 604800 (7 days); the default is one day. The CLI: vidjutsu url <hash> --ttl 3600.