Skip to main content

Uploading

Uploading a video is always the same three calls: create the video record, upload the file straight to storage with the URL that call returns, then tell the API the upload is complete so it can start transcoding. Below is a runnable version of that flow in cURL, Node, and Python, using a small sample video so you can copy, paste, and see a real video come back.

This needs jq installed to pull fields out of the JSON responses.

export HS_KEY=paste-your-key-here
curl -sL https://hyperserve.io/demo.mov -o sample.mov

V=$(curl -s -X POST https://dev.api.hyperserve.io/api/video \
-H "X-API-KEY: $HS_KEY" -H "Content-Type: application/json" \
-d '{"filename":"sample.mov","resolutions":["480p"],"isPublic":true}')

curl -s -X PUT "$(echo "$V" | jq -r .uploadUrl)" \
-H "Content-Type: $(echo "$V" | jq -r .contentType)" \
--data-binary @sample.mov

curl -s -X POST "https://dev.api.hyperserve.io/api/video/$(echo "$V" | jq -r .id)/complete-upload" \
-H "X-API-KEY: $HS_KEY"

Next steps

If you use an AI coding agent, Integrate with AI will wire this into your own project instead of a standalone sample. See File limits for the size and format ceilings the upload is checked against.