Videos

Start a direct video upload

Uploads a video of any size your storage allows: the file goes straight to storage in parts, never through this API. Send the size first; if it does not fit in your space (the file plus room for its 1080p editing copy, estimated at a third of the file) you get 402 storage_limit_exceeded before anything is sent. Then PUT each part (in order of n, any concurrency) to its URL, keep each response's ETag header, and call /v1/videos/uploads/complete. Need more part URLs (files above ~3 GB): /v1/videos/uploads/parts. Unfinished uploads are discarded after 7 days and never counted.

post/v1/videos/uploads

Request

  • Base URL: https://nanostudiopro.com/api
  • URL: https://nanostudiopro.com/api/v1/videos/uploads
  • Auth: HTTP bearer

Request body

filenamestring required
sizeinteger required

Bytes. Checked against your free space now and against the real file at the end.

content_typestring
project_idstring

Defaults to your most recently used project.

namestring
promptstring

What the clip should be findable by.

density'quick' | 'normal' | 'detailed'

Index it for search (clips up to 180 s).

metadataobject

A JSON object of your own fields (a quote number, a client, where it came from), at most 4 KB. Returned as metadata on every read.

sha256string

SHA-256 of the file, 64 hex characters. Optional: when this project already holds the same file, the answer is that clip with duplicate: true and nothing is uploaded.

keep_originalboolean

Every clip gets a light 1080p H.264 editing copy, made in the background after the upload and counted toward your storage (none when the file already is 1080p H.264). false drops the uploaded original once the copy exists: it frees the space, and the clip is 1080p from then on (frames, downloads, exports).

Example request

{
  "filename": "shoot-take-3.mp4",
  "content_type": "video/mp4"
}

Response

upload_token, part_size, part_count, parts: [{ n, url }], expires_at. Or, when sha256 matches a clip already in the project: that clip (id, permanent_url, metadata, …) with duplicate: true and no upload_token.

Changes

No recorded changes to this operation across all 3 revisions of this API.