# Files API — BrandApp Playground

> Upload, list, and delete files, with the initial listing fetched server-side.

- Canonical page: https://brandapp-playground.vercel.app/files
- Markdown: https://brandapp-playground.vercel.app/files.md
- SDK module: `@reopt-ai/brandapp-sdk/files`

## API

- `files.list({ limit, sortOrder })` — paginated listing
- `files.upload(buffer, { name, contentType })`
- `files.delete(fileId)`

The Server Component fetches the initial list with a `.catch()` fallback so a broken
connection degrades to an empty gallery rather than an error page. AI-generated images
show up in the same listing.

Uploads are bounded before parsing by `PLAYGROUND_MAX_UPLOAD_BYTES` (10 MiB by default).

## Related

- [File Browser](https://brandapp-playground.vercel.app/files/browser.md)
- [File Hooks](https://brandapp-playground.vercel.app/hooks/files.md)
- [Image Generation](https://brandapp-playground.vercel.app/ai/image.md)

---

Index of every document: https://brandapp-playground.vercel.app/llms.txt
Single-file copy: https://brandapp-playground.vercel.app/llms-full.txt
HTTP API description: https://brandapp-playground.vercel.app/openapi.json
