Skip to Content
Docs
ReferenceRead

List library files

POST
/list_files

Lists the images, videos, 3D models and canvases of the user's awen Library, newest first, 50 at a time: every project shared with them, or one project. Pass a file's id to fetch to read its description, prompt and download link. Pass next_cursor back as cursor for the next page.

Needs a key with awen:read. Costs 2 units of the key's rate limit.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from Settings → Connected apps → API keys, sent as Authorization: Bearer awen_sk_…. Keep it on a server: a request from a web page is refused.

Request Body

application/json
  1. body
project_id?string

Only this project's files.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 128
type?string

Only files of this kind.

Value in"image""video""three_d""canvas"
cursor?string
Length1 <= length <= 512

Response Body

The operation's answer.

application/json
  1. response
files*array<>
next_cursor*string|null
Example Request
curl -X POST 'https://app.awen.ai/api/v1/list_files' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "files": [    {      "id": "string",      "entry_id": "string",      "kind": "image",      "name": "string",      "media_id": "string",      "revision_id": "string",      "project": {        "project_id": "string",        "name": "string"      },      "created_at": "string",      "updated_at": "string",      "has_lineage": true,      "url": "string"    }  ],  "next_cursor": "string"}