---
title: "Start a chunked Library upload (large-file transport)"
method: POST
path: "/workspaces/{workspaceId}/library/multipart/initiate"
tags: ["Library"]
---

# Start a chunked Library upload (large-file transport)

`POST /workspaces/{workspaceId}/library/multipart/initiate`

## Request

- Base URL: `https://api.rendley.com/v1`
- URL: `https://api.rendley.com/v1/workspaces/{workspaceId}/library/multipart/initiate`
- Auth: API key in header `Authorization`

For files above the proxy cap: records a pending asset and returns presigned part URLs pointing straight at object storage. Finish with the multipart complete call. When identical content already exists in the Library the response carries `existing` (deduplicated=true) instead of an upload session — skip the transfer.

## Path parameters

- `workspaceId` string, required

## Request body

- TypesLibraryMultipartInitInput
  - `duration` number
  - `file_hash` string, required: FileHash is required: multipart bytes go client→bucket, so the client is the only party that ever holds the full stream — every completed library row must carry its content hash (XXH3-64, 16 hex chars).
  - `file_size` integer, required
  - `mime_type` string
  - `original_file_name` string
  - `part_count` integer, required
  - `source` 'uploaded' | 'export': Source provenance; clients may claim "uploaded" (default) or "export".
  - `transient` boolean: Transient uploads are scratch input for an AI job: never listed as a Library asset, unmetered, removed by the daily stale-upload sweep. Reference by upload id only.

## Response `200`

OK

- object
  - `data` object: Success data
    - `existing` TypesLibraryUpload
      - `created_at` string
      - `deduplicated` boolean: Deduplicated marks a proxy-upload response that resolved to an existing asset with identical content instead of storing a second copy.
      - `download_url` string: DownloadUrl is a presigned GET that forces a browser download (Content-Disposition: attachment) under the original filename. Expires like Url.
      - `duration` number
      - `file_hash` string
      - `file_size` integer
      - `id` string
      - `media_id` string: MediaID is the upload's storage_key; clients reuse it as the editor media id when bridging a library asset into a project, so ids stay stable.
      - `mime_type` string
      - `original_file_name` string
      - `source` string
      - `status` 'uploading' | 'importing' | 'complete' | 'failed'
      - `tags` string[]
      - `thumbnail_url` string: ThumbnailUrl is a presigned GET for the server-generated poster (video first frame / GIF still). Empty when none exists. Expires like Url.
      - `url` string: Url is a presigned GET for the asset bytes. Expires — never persist it.
      - `workspace_id` string
    - `media_id` string: MediaID identifies the file once complete (see CreateUpload.MediaID).
    - `presigned_urls` TypesMultipartPartURL[]
      - `part_number` integer
      - `url` string
    - `s3_upload_id` string
    - `upload_id` string
  - `error` HttpResponseAPIError
    - `code` string
    - `fields` HttpResponseFieldError[]
      - `field` string
      - `message` string
    - `message` string
  - `meta` unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/rendley/apis/rendley-api.md) - [All operations](https://skmtc.dev/rendley/apis/rendley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rendley/apis/rendley-api/revisions/7eb8713bbf78?raw)
