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

# Templates, brand kits and uploads

> Reuse library files, create section-based brand kits, and save templates from a generation.

## Upload once, reuse by ID

Send a filename, MIME type and exact byte size to `POST /uploads`:

```json theme={null}
{"filename":"brand-guide.pdf","content_type":"application/pdf","file_size":123456}
```

The response contains `id`, `upload_url`, `upload_method: "POST"`, `upload_fields` and `expires_at`. Submit every form field to the upload URL, followed by the file as the last field named `file`. Then call `POST /uploads/{id}/complete` with an empty object. Completion is safe to repeat and freezes the file before adding it to your library.

The upload ID is also the library asset ID. Read `GET /assets/{id}` until its status is `ready`. States are `uploading`, `processing`, `ready` and `failed`; downloads are available only when ready. Uploads support media, fonts and documents up to 512 MiB. Read and write require their respective `motion:assets:read` and `motion:assets:write` scopes.

Use the same asset in any accessible project:

```json theme={null}
{"prompt":"Create a launch film using this guide.","attachments":[{"asset_id":"ASSET_UUID"}]}
```

Send that to `POST /projects`, or include the attachment with a follow-up message. Asset access is checked for every use. Library files survive the originating chat.

## Create a brand kit with sections

Send structured guidelines to `POST /brand-kits`:

```json theme={null}
{
  "name":"Acme",
  "sections":[
    {"title":"Logo","text":"Use the white logo on dark backgrounds.","asset_ids":["LOGO_ASSET_UUID"]},
    {"title":"Typography","text":"Use Acme Sans for headlines.","asset_ids":["FONT_ASSET_UUID"]}
  ]
}
```

`asset_ids` lists ready Library assets for that section, in order: IDs from `GET /assets` or a completed upload. Each new ID must be readable by you in the current workspace; you cannot attach someone else's private file or an upload that has not been completed. An ID can appear once per section. A kit allows up to 50 sections, 500 distinct asset IDs and 100,000 text characters in total. Section IDs are generated when omitted.

To edit a kit, send `PUT /brand-kits/{id}` with `{"definition":{...},"updated_at":"CURRENT_TIMESTAMP"}`. The definition uses the same `sections` and `asset_ids` shape and replaces the saved one. Keep each section's `id` from the last read to preserve it, and supply the current `updated_at` from that read so another edit is never overwritten. Saved kits are read back with their files under each section's `assets`. Files remain reusable library assets. Full MCP's `create_brand_kit` and `update_brand_kit` take the same fields.

## Save a template from a generation

Send this to `POST /templates`:

```json theme={null}
{"title":"Product launch","generation_id":"GENERATION_UUID"}
```

Motion resolves the source project and checks edit access. The template preserves **all authored outputs** and saves the immutable source without requiring a render. No project ID or output ID is needed; `mode` is `layout_and_style` (default) or `style`; `instructions` provides guidance for future reuse.

List saved templates with `GET /templates/list`. Read the template at `GET /templates/{id}`. Edit it with `PATCH /templates/{id}`, supplying its current `version_id` and the fields to change. Gallery preview preparation can finish later. An optional REST `Idempotency-Key` UUID can be reused with identical input when retrying a lost creation response.

## Delete a template or brand kit

Use `DELETE /templates/{id}` to delete a template. Use `DELETE /brand-kits/{id}` with `{"updated_at":"CURRENT_TIMESTAMP"}` to delete a brand kit. Both return `{"id":"RESOURCE_ID","deleted":true}`. Deleted resources disappear from inventory and cannot be selected for new work. Existing generations, historical turn snapshots and uploaded assets are preserved. Clear deleted selections with `template_ids: []` or `brand_kit_ids: []` when continuing a project.

Full MCP uses `delete_template` and `delete_brand_kit`.

## Ask the agent to create resources

Use the normal project flow for analysis and creative work:

```json theme={null}
{
  "prompt":"Extract the branding from these references, save a brand kit, and create an editable template. Report the saved IDs and any uncertain inferences.",
  "attachments":[{"asset_id":"REFERENCE_ASSET_UUID"}]
}
```

Poll the project and read its messages. Verify saved IDs through the brand-kit or template collection. An accepted project does not guarantee that a resource was saved. Put a source project link in the prompt, just as in Motion. Attachments are uploaded library assets. Future projects select saved templates and brand kits with `template_ids` and `brand_kit_ids`, including a one-element array for a single brand kit.

Full MCP exposes `create_library_upload`, `complete_library_upload`, `get_library_asset`, `create_brand_kit` and `create_template`, alongside the project tools. Existing managed connector catalogs and the legacy temporary-upload request shape remain supported.


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