Files

Get a file with lineage

Changed on

Returns one file with its full lineage, including the cost breakdown of the job tree when the job spawned sub-generations.

get/resources/files/{id}

Request

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

Path parameters

idstring required

Response

The file

idstring
source'attachment' | 'gateway'

gateway for generated files, attachment for uploads.

urlstring
filenamestring nullable
titlestring nullable
subtitlestring nullable
media_typestring nullable
sizeinteger nullable
created_atstring date-time
hashstring nullable
thumbnail_urlstring nullable
origin'upload' | 'generated'
created_bystring uuid nullable
creator_type'user' | 'api_key' | 'system' | 'null' nullable
metadataobject nullable
is_favoriteboolean

Example response

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

Changes