> ## Documentation Index
> Fetch the complete documentation index at: https://grow-hub.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Assets

> Uploading media and attaching it to a post.

An **asset** is a file owned by a studio — an image, a video, or a document. An
asset is uploaded first, then attached to a post.

## Kinds and limits

| Kind       | MIME types                             | Max size | Max per post |
| ---------- | -------------------------------------- | -------- | ------------ |
| `image`    | `image/jpeg`, `image/png`, `image/gif` | 10 MB    | 9            |
| `video`    | `video/mp4`, `video/quicktime`         | 5 GB     | 1            |
| `document` | `application/pdf`, `.pptx`, `.docx`    | 100 MB   | 1            |

<Note>
  Storage accepts all three kinds, but **publishing is image-only today**.
  Publishing a post with a video or document attached fails with
  `publishing_video_not_supported_yet`. Per-platform image ceilings still apply:
  9 for LinkedIn, 4 for X.
</Note>

## Three ways to upload

<CardGroup cols={3}>
  <Card title="Upload session" icon="window-maximize">
    `create_upload_session` returns a browser link. The user drags files in — any
    size, no client-side plumbing. Best when a human is in the loop.
  </Card>

  <Card title="Presigned PUT" icon="cloud-arrow-up">
    `request_asset_upload` returns a signed URL. `PUT` the raw bytes, then
    `attach_asset`. Best for large files and clients that can do HTTP.
  </Card>

  <Card title="Inline base64" icon="file-code">
    `upload_asset_inline` takes the bytes in the tool call. Capped at 5 MB. Best
    when the client can't make its own HTTP requests.
  </Card>
</CardGroup>

## Lifecycle

```
request_asset_upload ──▶ PUT bytes ──▶ attach_asset ──▶ post.assets[]
upload_asset_inline  ─────────────────▶ attach_asset ──▶ post.assets[]
create_upload_session ──▶ user drops files in the browser ──▶ post.assets[]
```

An asset is `pending` until its bytes are confirmed, then `ready`. `attach_asset`
does that confirmation: it checks the bytes actually landed, enforces the size
limit, and enforces the per-post count. Only `ready` assets are published.

`detach_asset` removes an asset from a post but keeps the stored file, so you can
re-attach it to another post.

## Expiry

| Link                                             | Valid for  |
| ------------------------------------------------ | ---------- |
| Presigned upload URL (`request_asset_upload`)    | 10 minutes |
| Browser upload session (`create_upload_session`) | 30 minutes |

Both are re-mintable — call the tool again for a fresh link.
