Upload a file
Use this when the source is on disk instead of a URL.
POST /videoswithsource.typeuploadand afileName(no path separators).POST /videos/{videoId}/uploadsto receive a resumable URL.- Start the upload session on that URL (
x-goog-resumable: start), then send the bytes. - The source pipeline starts when the object is complete. Poll
import_{videoId}.
curl -sS -X POST "$BRAIV_API_BASE/videos" \ -H "Authorization: Bearer $BRAIV_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"source":{"type":"upload","fileName":"source.mp4","contentType":"video/mp4"}}'The create response includes an upload.complete path. Call that to get the signed URL, then upload. Details: Start a resumable upload.
From hosted MCP, braiv_prepare_local_upload runs steps 1–2 and returns the start URL. The agent (or curl) on the machine that has the file must still do step 3. Hosted MCP cannot stream local bytes.