Add to Library
add_to_libraryAdd a file to a Brand Library. Briefs, Brand Edits, and Brand Skills can draw on Library images. Video and audio stay stored with the brand for other workflows; those features do not use them yet. Pass exactly one source:
upload_id: a completed upload fromcreate_upload_urls, for local files.media_id: an existing image, video, or audio ID, such as a generation output. Media from another brand is copied.url: a public HTTPS URL; a copy is stored.
The type is detected from the file: images (JPEG, PNG, WebP, AVIF, SVG; max 10MB), video (MP4, WebM, MOV), and audio (MP3, WAV, OGG, FLAC, AAC, M4A), max 100 MiB. Returns the Library item with its media ID, stable link, and file details. If the brand already holds identical file contents, returns that item with existing: true. URLs are downloaded on every add, so changed contents may return a different item.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"brand_session_id": "<brand_session_id>"
},
"name": "add_to_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public HTTPS location from which to download a copy of the file into this Brand Library. | |
| media_id | No | Existing image, video, or audio asset to add to this Brand Library. Use the media asset's ID, such as a generation output's id. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Omit it or pass "unknown" if you are not certain; the tool runs the same either way. Recorded only for the server developer's analytics. | |
| upload_id | No | Temporary upload containing the file to save in this Brand Library. Use its ID from create_upload_urls or get_file_picker_handoff after the bytes have been uploaded. | |
| brand_session_id | Yes | Brand session ID from list_brands for the brand whose Library to use. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Media ID of the file. | |
| url | Yes | Stable link to the file. | |
| type | Yes | Media family: image, video, or audio. | |
| width | Yes | Width in pixels, or null when not recorded. | |
| height | Yes | Height in pixels, or null when not recorded. | |
| source | Yes | uploaded, scraped (collected from a brand source), or generated. | |
| existing | Yes | True when the brand already held this file; nothing new was stored. | |
| file_size | Yes | File size in bytes. | |
| mime_type | Yes | MIME type of the file. | |
| created_at | Yes | Time the file was stored. | |
| in_library | Yes | Whether the file is in its Brand Library. | |
| description | Yes | Text description of the file, or null when there is none. | |
| duration_ms | Yes | Duration in milliseconds, or null when not recorded. | |
| workspace_id | Yes | Workspace ID, or null for a personal workspace that has no ID. | |
| generation_id | Yes | ID of the generation that produced the file, or null when none is recorded. | |
| brand_session_id | Yes | Brand session ID of the brand the file belongs to. |