Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Hugging Face Transformers models API

Get information from all models on the Hub.

Hugging Face Transformers models API is one of 27 APIs that Hugging Face Transformers publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include models. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 36 operations across 33 paths. It is described by OpenAPI 3.1.0, at version 0.0.1.

Requests are made against a single base URL, https://huggingface.co.

36 operations 33 paths 0 schemas 3 DELETE18 GET14 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
0.0.1
Base URL
https://api-inference.huggingface.co
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

Hugging Face Transformers models API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated.

Paths & Operations 36

Across 33 paths, the API surfaces 36 operations — 3 DELETE, 18 GET, 14 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

models 36

Get information from all models on the Hub.

GET
/api/models/{namespace}/{repo}/treesize/{rev}/{path}
Get folder size
4 params → 200
GET
/api/models/{namespace}/{repo}/lfs-files
List Large files
5 params → 200
POST
/api/models/{namespace}/{repo}/lfs-files/batch
Delete Large files
2 params body
DELETE
/api/models/{namespace}/{repo}/lfs-files/{sha}
Delete Large file
4 params
POST
/api/models/{namespace}/{repo}/lfs-files/duplicate
Duplicate xet files
2 params body → 200207
GET
/api/models/{namespace}/{repo}/commits/{rev}
List commits
6 params → 200
GET
/api/models/{namespace}/{repo}/refs
List references
3 params → 200
GET
/api/models/{namespace}/{repo}/compare/{compare}
Get a compare rev
4 params → 200
POST
/api/models/{namespace}/{repo}/paths-info/{rev}
List paths info
3 params body → 200
POST
/api/models/{namespace}/{repo}/preupload/{rev}
Check upload method
3 params body → 200422
GET
/api/models/{namespace}/{repo}/xet-write-token/{rev}
Xet write token
3 params → 200
GET
/api/models/{namespace}/{repo}/xet-read-token/{rev}
Xet read token
3 params → 200
POST
/api/models/{namespace}/{repo}/commit/{rev}
Commit
6 params → 200
POST
/api/models/{namespace}/{repo}/tag/{rev}
Create tag
3 params body
DELETE
/api/models/{namespace}/{repo}/tag/{rev}
Delete a tag
3 params
POST
/api/models/{namespace}/{repo}/branch/{rev}
Create branch
3 params body
DELETE
/api/models/{namespace}/{repo}/branch/{rev}
Delete a branch
3 params
POST
/api/models/{namespace}/{repo}/resource-group
Add resource group
2 params body → 200
GET
/api/models/{namespace}/{repo}/resource-group
Get resource group
2 params → 200
POST
/api/models/{namespace}/{repo}/super-squash/{rev}
Squash ref
3 params body → 200
PUT
/api/models/{namespace}/{repo}/settings
Update repo settings
2 params body → 200
GET
/api/models/{namespace}/{repo}/tree/{rev}/{path}
List folder content
8 params → 200
GET
/api/models/{namespace}/{repo}/notebook/{rev}/{path}
Get notebook URL
4 params → 200
GET
/api/models/{namespace}/{repo}/scan
Get security status
2 params → 200
GET
/api/models/{namespace}/{repo}/jwt
Generate JWT
8 params → 200
GET
/api/models-tags-by-type
Get model tags
1 param → 200
GET
/api/trending
Get trending
2 params → 200
GET
/{namespace}/{repo}/resolve/{rev}/{path}
Resolve a file
6 params → 200302304307
GET
/api/resolve-cache/models/{namespace}/{repo}/{rev}/{path}
Resolve a file
6 params → 200302304307
POST
/{namespace}/{repo}/ask-access
Request access
2 params body → 303
GET
/{namespace}/{repo}/user-access-report
Export access report
2 params → 200
POST
/api/models/{namespace}/{repo}/user-access-request/cancel
Cancel access request
2 params
GET
/api/models/{namespace}/{repo}/user-access-request/{status}
List access requests
6 params → 200
POST
/api/models/{namespace}/{repo}/user-access-request/handle
Handle access request
2 params body
POST
/api/models/{namespace}/{repo}/user-access-request/batch
Handle access requests in batch
2 params body → 200
POST
/api/models/{namespace}/{repo}/user-access-request/grant
Grant access
2 params body

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hugging-face-transformers-models-api-openapi.yml Raw ↑

Other APIs Hugging Face Transformers publishes across the network.

Hugging Face Transformers Library
Hugging Face Inference API
Hugging Face Spaces API
Text Generation Inference (TGI)
Hugging Face Transformers agentic-provisioning API
Hugging Face Transformers auth API
Hugging Face Transformers buckets API
Hugging Face Transformers collections API
Hugging Face Transformers datasets API
Hugging Face Transformers discussions API
Hugging Face Transformers docs API
Hugging Face Transformers inference-endpoints API