Files

List the caller's files. Filter by creation criteria (?tool=speech, ?model=eleven_turbo_v2, ?q=hello), by kind (?kind=image|video|audio for media type, ?kind=upload|generated for origin), or by date range (?from=, ?to=, ISO 8601). tool, model and q cannot be combined with kind, from or to; the search filters win. workspace takes precedence over every other filter.

get/files

Request

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

Query parameters

workspacestring

Folder id or slug, or unfiled for files in no folder. When set, all other filters are ignored.

toolstring
modelstring
qstring

Search in prompts/titles

kind'image' | 'video' | 'audio' | 'upload' | 'generated'

Media type (image, video, audio) or origin (upload, generated). origin is accepted as an alias.

limitinteger
cursorinteger
fromstring date-time
tostring date-time

Response

File list

nextCursorinteger nullable required

Offset to pass as cursor for the next page; null on the last page

Example response

{
  "data": [
    {
      "id": "file_abc123",
      "metadata": {
        "width": 1920,
        "height": 1080
      }
    }
  ]
}

Changes