---
title: "Add a project's media file to the workspace Library"
method: POST
path: "/workspaces/{workspaceId}/library/from-project"
tags: ["Library"]
---

# Add a project's media file to the workspace Library

`POST /workspaces/{workspaceId}/library/from-project`

## Request

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

Copies the media (resolved by project ID + content hash) into the Library server-side — no bytes transit the client. Returns the existing asset with deduplicated=true when identical content is already in the Library.

## Path parameters

- `workspaceId` string, required

## Request body

- TypesLibraryPromoteInput
  - `file_hash` string, required
  - `project_id` string, required

## Response `200`

OK

- object
  - `data` object: Success data
    - `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
  - `error` HttpResponseAPIError
    - `code` string
    - `fields` HttpResponseFieldError[]
      - `field` string
      - `message` string
    - `message` string
  - `meta` unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

---

[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)
