---
title: "List assets"
method: POST
path: "/api/v1/tools/list_assets"
---

# List assets

`POST /api/v1/tools/list_assets`

## Request

- Base URL: `https://www.trezalabs.com`
- URL: `https://www.trezalabs.com/api/v1/tools/list_assets`
- Auth: HTTP bearer

Browse the account's media library: every image, video, and audio file its pipeline runs and chat generations produced, newest first. The urls it returns are the ones assemble_video and edit_asset accept, so start here when asked to cut, caption, score, or otherwise finish media the account already has. A file the user attached in the conversation is not here until import_media adds it. Clients that show panels let the person pick files from this list: the picks reach you as context naming each file by its #position in the list with its exact url, and the person then says in the chat what to do with them. Apply that to exactly those files, and do not assume picks mean joining them.

## Request body

- object
  - `kind` 'image' | 'video' | 'audio': Only return assets of this kind.
  - `query` string: Case-insensitive text matched against each asset's generation prompt, e.g. "horse". Omit for the newest regardless of subject.
  - `limit` integer: How many to return, newest first. Default 12.

## Response `200`

The tool's result.

- object

## Other responses

- `400`: The arguments were refused. `error` says why.
- `401`: No API key, or one that is not valid.
- `402`: The credit balance does not cover this run.
- `403`: The API key lacks a permission this tool needs.
- `404`: No such tool, or the pipeline, run or asset is not on this account.
- `429`: Too many runs started or in progress. Wait, then try again.

---

[API](https://skmtc.dev/trezalabs/apis/treza-pipelines-api.md) · [All operations](https://skmtc.dev/trezalabs/apis/treza-pipelines-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trezalabs/apis/treza-pipelines-api/revisions/a76574c1731b?raw)
