Skip to content

API: Media

List the files of the library by content hash, with origin, tags and reuse

GET /api/v1/assets: List the files of the library by content hash, with origin, tags and reuse

Last updated:

GET/api/v1/assets

Authentication#

Send the secret in the header Authorization: Bearer <secret>: the local token in local mode, an API key in network mode. An API key needs the read scope; the local token has every scope. See the API overview for both modes.

Query parameters#

NameTypeRequiredDescription
cursorstringnoThe next_cursor of the previous page.
limitintegernoThe page size; the default depends on the operation.
kindstringnoimage, video, audio or lut; omit it for every kind.
sectionstringnovisual (image, lut), video (video) or audio (audio): the three sections of the library.
tagstringnoKeep the files that carry this tag.
projectstringnoKeep the files a project, or one of its timelines, uses.
originstringnoimported, generated, fetched_by_agent or rendered_externally.
reusablestringnotrue keeps the files marked reusable, false the others.
textstringnoA full-text query over name, tags, description and origin; at most 8 words.
sound_kindstringnomusic, voice or effect: keep the audio files of that sound kind.

Responses#

200 OK#

Content type application/json. Schema: AssetListResult.

NameTypeRequiredDescription
assetsarray of LibraryAssetno
file_countintegerno
next_cursorstring or nullno
tags_in_usearray of TagCountno
textstringno
totalintegerno
total_bytesinteger (int64)no
total_size_textstringno
unsizedintegerno
untrusted_noticestringno

400#

Validation failed; errors maps each field to its messages and issues lists each problem with its code, key and params

Content type application/problem+json. Schema: Problem.

401 Unauthorized#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

403#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

429#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

Any other status#

Error (RFC 9457 problem details)

Content type application/problem+json. Schema: Problem.

curl -X GET "http://127.0.0.1:7878/api/v1/assets" \
  -H "Authorization: Bearer $STUARTY_KEY"

Response examples

{
  "assets": [
    {
      "bytes": 0,
      "created_at": "string",
      "created_by": "string",
      "description": "string",
      "duration_ms": 0,
      "hash": "string",
      "height": 0,
      "kind": "string",
      "name": "string",
      "origin": {},
      "poster": {},
      "projects": 0,
      "reusable": false,
      "size_text": "string",
      "sound_kind": "string",
      "state": "string",
      "tags": [],
      "uses": [],
      "width": 0
    }
  ],
  "file_count": 0,
  "next_cursor": "string",
  "tags_in_use": [
    {
      "count": 0,
      "tag": "string"
    }
  ],
  "text": "string",
  "total": 0,
  "total_bytes": 0,
  "total_size_text": "string",
  "unsized": 0,
  "untrusted_notice": "string"
}

The examples are built from the schemas of the OpenAPI document, so a value is a placeholder of its type. The fields that carry the real values are in the tables.