models
Get safetensors metadata
Changed onGet the parsed headers of all the shards of a sharded safetensors model in a single request, instead of reading the index and then the header of every shard.
Only the main revision is served: the ETag is the commit sha of main, and requests with a matching If-None-Match get a 304. Returns 400 when the path isn't a .safetensors.index.json file and 422 when the files can't be parsed.
The response is brotli-compressed when the client accepts it, otherwise gzip-compressed or plain JSON.
get/api/models/{namespace}/{repo}/safetensors-metadata/{path}
Request
- Base URL: https://huggingface.co
- URL: https://huggingface.co/api/models/{namespace}/{repo}/safetensors-metadata/{path}
- Auth: HTTP bearer
Path parameters
namespacestring required
repostring required
pathstring required
Wildcard path parameter
Response
Parsed headers of the shards of a sharded safetensors model
Changes
- info
endpoint added
- info