> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rainbrand.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload local files

> Upload a local file to use as a brand source or an asset.

Upload a local file, then choose how Rainbrand should use it: as a brand source, a file in the Brand Library, a font asset, or an input to a model. If the destination accepts public URLs and your file has one, use it directly.

## Choose an upload method

* **MCP picker:** clients that support MCP Apps can open a file picker with `open_upload_ui`.
* **Direct upload:** API clients and MCP clients that can read local files and make HTTP requests can reserve storage and PUT the bytes themselves. Every authenticated MCP client receives `create_upload_urls`.

If an MCP client cannot execute the returned PUT request, use the picker. If neither method is usable, use a publicly reachable HTTPS URL. Private attachment URLs from the host client are not supported.

Use the destination's workspace for the upload. For an existing brand, read its `workspace_id` with `list_brands` or `get_brand`. For a new brand, stage the files and create the brand in the same workspace.

## Stage files through the MCP picker

1. Call `open_upload_ui` with only `workspace_id`: the selected workspace ID, or `null` for the personal workspace. Use `list_workspaces` if needed.
2. Select and upload the files. Retry failed files, or explicitly continue with the successful files.
3. Choose Continue. The picker verifies the uploads and sends an upload reference in chat.
4. Call `get_file_picker_handoff` with that `reference` to receive the verified `workspace_id`, filenames, `upload_id` values, and a temporary `url` for each file. Use the IDs with a [destination below](#use-the-uploaded-file), or pass the `url` to a model.

The reference itself is not an upload ID. Pass only verified upload IDs to the destination; cancellation or zero successful uploads must not start onboarding. For `onboard_brand`, pass the returned `workspace_id` when non-null and omit it when `null`. Follow the live schema for other tools.

If Continue cannot prepare the reference, try again. If the picker cannot send the message, copy the provided message into chat. If the files have expired, upload them again.

### Save images directly to a Brand Library

Call `open_upload_ui` with only `brand_session_id` instead of `workspace_id`. This mode saves images to the existing Brand Library without a Continue step. After each successful batch, the picker sends a chat message with all Library image IDs saved through that picker so far and also updates widget context. Use those final image IDs to continue the task; they are not temporary upload IDs.

It accepts up to 10 PNG, JPEG, WebP, or AVIF images per batch, up to 10 MiB each.

## Stage files through direct upload

1. Call [Upload files (`POST /uploads`)](/api-reference/uploads/upload-files) in REST or `create_upload_urls` in MCP with each filename and exact byte length. If you'll give the file to a model, also send its MIME type, such as `image/png`, as `contentType` (REST) or `content_type` (MCP).
2. PUT the raw file bytes to the returned URL using the returned method and required headers. Do not send multipart form data.
3. After the PUT succeeds, pass `uploadId` in REST or `upload_id` in MCP to the destination. There is no separate confirmation request.

Both staging methods accept up to 30 files, 100 MiB per file, and 256 MiB combined. Picker uploads expire after two hours; for direct uploads, follow the returned expiry time. Temporary uploads are private and reusable by authorized operations in the same workspace until expiry.

Staging alone does not change a brand or add files to the Brand Library. Models take the temporary `url`, not the upload ID, and it stops working when the upload expires. Models can reject or ignore a file uploaded without its MIME type, so send one when reserving. The picker sends the type your browser reports. Supported types are kept: PNG, JPEG, WebP, AVIF, GIF, SVG, MP4, WebM, MOV, MP3, WAV, OGG, FLAC, AAC, M4A, and PDF; any other file is stored without a type. The destination validates the file and applies its own requirements and limits.

## Use the uploaded file

| Use | REST | MCP |
| - | - | - |
| Create a brand from files | Add `{ "kind": "file", "uploadId": "..." }` to `sources` in [Create a brand](/api-reference/brands/create-a-brand). | Pass the file source to `onboard_brand`. |
| Add evidence to an existing brand | Add the file source to `evidence.sources` in [Create a Brand Edit](/api-reference/brands/create-a-brand-edit). | Pass the file as evidence to `create_brand_edit`. |
| Add a file to the Brand Library | Send `{ "type": "upload", "uploadId": "..." }` as `source` in [Add to a Brand Library](/api-reference/library/add-to-a-brand-library). | Pass the upload to `add_to_library`. |
| Upload a custom font | Pass `uploadId` to [Upload a brand font](/api-reference/brands/upload-a-brand-font). | Pass the upload to `upload_brand_font`. |
| Give a file to a model | Put the upload's `url` where the model's input takes a file URL in [Start a generation](/api-reference/generations/start-a-generation). | Put the upload's `url` in the input to a `generate_*` tool. |

To use a Library image as the primary logo or assign an uploaded font, prepare and apply a [Brand Edit](/guides/edit-brand). Saving the asset alone does not change the active brand.

Font assets are single-use and expire after 24 hours. The Brand Edit using one must finish preparing before the returned `expiresAt` (REST) or `expires_at` (MCP). Upload the font again after expiry, failed preparation, or for a later edit.

See [Create a brand](/guides/create-brand) for the creation workflow. Use the linked API reference or your connected account's live MCP schemas for exact destination fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.