Files

List files with lineage

Changed on

Lists uploads and generated files in one list, newest first, each with its lineage (tool, model, prompt, cost) and favorite flag. Compared to GET /files it can filter by folder, creator and favorites. Uploads have lineage: null.

Multi-value filters (kind, tool) accept repeated parameters or a comma-separated value and are OR-combined. A malformed created_by or creator_api_key_id is ignored rather than rejected.

get/resources/files

Request

  • Base URL: https://api.varg.ai/v2
  • URL: https://api.varg.ai/v2/resources/files
  • Auth: HTTP bearer

Query parameters

kindstring[]

Media kind (image, video, audio) and/or origin (upload, generated). Unknown values are ignored.

toolstring[]

Restrict to files produced by these tools. Unknown values are ignored.

searchstring

Matches the prompt, text or code of the job that produced the file.

workspacestring

Folder id or slug, or unfiled for files in no folder.

favoritesboolean

When true, only files the caller has favorited.

created_bystring uuid

Only files created by this user id.

creator_api_key_idstring uuid

Only files created through this API key id.

fromstring date-time

Earliest creation time (ISO 8601).

tostring date-time

Latest creation time (ISO 8601).

limitinteger
cursorinteger

Offset returned as nextCursor by the previous page.

Response

Page of files

nextCursorinteger nullable required

Example response

{
  "data": [
    {
      "created_by_api_key": {
        "key_preview": "varg_a1b2...c3d4"
      },
      "lineage": {
        "tool": "image"
      }
    }
  ]
}

Changes