models

List folder content

Changed on

List the content of a repository tree, with pagination support.

get/api/models/{namespace}/{repo}/tree/{rev}/{path}

Request

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

Path parameters

namespacestring required
repostring required
revstring required
pathstring required

Wildcard path parameter

Query parameters

expandstring

If true, returns returns associated commit data for each entry and security scanner metadata.

recursivestring

If true, returns the tree recursively.

limitinteger

1.000 by default, 100 by default for expand=true

cursorstring

Response

List of entries in the repository tree

type'file' | 'directory' | 'unknown' required
oidstring required
sizeinteger

If the file is a LFS pointer, it'll return the size of the remote file

xetHashstring

Changes

    • breaking

      for the query request parameter expand, default value false was removed

    • breaking

      for the query request parameter recursive, default value false was removed

    • breaking

      the ///// response's property type changed from no type to string for status

    • breaking

      the /// response's property type changed from no type to string for status

    • breaking

      the ///// response's property type changed from no type to string for status

    • breaking

      the /// response's property type changed from no type to string for status

    • breaking

      the ///// response's property type changed from no type to string for status

    • breaking

      the /// response's property type changed from no type to string for status

    • breaking

      the ///// response's property type changed from no type to string for status

    • breaking

      the /// response's property type changed from no type to string for status

    • breaking

      the // response's property type changed from no type to string for status

    • breaking

      the ///// response's property type changed from no type to string for status

    • breaking

      the /// response's property type changed from no type to string for status

    • breaking

      the / response's property type changed from no type to string for status

    • info

      for the query request parameter expand, the type was generalized from no type to string

    • info

      for the query request parameter recursive, the type was generalized from no type to string

    • info

      the // response's property pattern was changed from ^((\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\d|3[01])|(0[469]|11)-(0[1-9]|[12]\d|30)|(02)-(0[1-9]|1\d|2[0-8])))T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(\.\d+)?(Z)$ to ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ for the status