datasets

Get folder size

Get the total size of a repository at a given revision, optionally under a specific subpath. Returns the total size in bytes of all files under the specified path (recursively). If a file is stored via Xet/LFS, the LFS file size is used.

get/api/datasets/{namespace}/{repo}/treesize/{rev}/{path}

Request

  • Base URL: https://huggingface.co
  • URL: https://huggingface.co/api/datasets/{namespace}/{repo}/treesize/{rev}/{path}
  • Auth: HTTP bearer

Path parameters

namespacestring required
repostring required
revstring required
pathstring required

Wildcard path parameter

Response

Total size of a repository at a given revision, under the given path

pathstring required

The normalized path of the subtree, starting with a slash

sizeinteger required

Total size in bytes of all files under the subtree

Changes

No recorded changes to this operation across all 276 revisions of this API.