Upload video directly (single request)

Recipes
⬆️
Upload a video (TUS)
Open Recipe
🚚
Migrate videos from another platform
Open Recipe
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /files

Uploads a video to PandaVideo in a single request using the TUS resumable upload protocol. Send the entire file in one POST /files to an uploader server — the metadata (auth token, filename, optional folder) travels in the Upload-Metadata header.

📘

Uploader host

The uploader runs on a separate host from the main API: https://uploader.pandavideo.com/files/ (global endpoint, no need to pick a region).

Headers

Headers paramsTypeDescription
Tus-ResumableStringThe Tus-Resumable header MUST be included in every request and response with value 1.0.0
Upload-LengthNumberThe Upload-Length header indicates the size of the entire upload in bytes.
Content-TypeStringapplication/offset+octet-stream
Upload-MetadataString

The Upload-Metadata request and response header MUST consist of one or more comma-separated key-value pairs. The key and value MUST be separated by a space. The key MUST NOT contain spaces and commas and MUST NOT be empty.

The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.

All keys MUST be unique. In these cases, the space, which would normally separate the key and the value, MAY be left out.

Possible values:
  • authorization* (your api key, don't forget base64 encode all values)
  • folder_id* (optional, only if you want to upload inside of the folder )
  • filename* (file name)
  • video_id* (uuid v4, optional)

Usage example available in our github

📘

Uploader URL

Uploads go to the upload server, not to api-v2.pandavideo.com.br. Send them to the global endpoint https://uploader.pandavideo.com/files/ — there is no need to pick a regional server. The regional hosts returned by List Uploader Servers (e.g. uploader-us01.pandavideo.com.br) are legacy; new integrations should use the global endpoint.

Full examples in Node.js, Python and cURL: Upload a video (TUS).

Limits

  • Max file size: 200 GB per upload (Tus-Max-Size: 214748364800).
  • Concurrent uploads: limited per library (5 by default). Extra uploads are rejected with errCode 10 — wait for one to finish and retry.
  • Resumable: if the connection drops, send HEAD to the upload Location to read Upload-Offset and continue with PATCH from there. TUS clients (tus-js-client, tuspy, tus-java-client, …) do this for you.
  • Supported TUS extensions: creation, creation-with-upload, creation-defer-length, concatenation, termination.

Errors

A rejected upload returns HTTP 400 with a JSON body:

{ "errCode": 10, "errMsg": "you have reached the upload concurrency limit, please wait and try again" }
errCodeMeaning
1authorization metadata is missing
2Invalid API key
3, 4User not found / not confirmed
6Storage limit of the plan reached
7Traffic limit of the plan reached
8The video_id sent already exists
10Concurrent upload limit reached (retry later)
14Video count limit of the plan reached
15Account is not active

Please check tus protocol documentation.

Response
200
Language
LoadingLoading…