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 collections API

Use Collections to group repositories from the Hub (Models, Datasets, Spaces and Papers) on a dedicated page.You can learn more about it in the Collections [guide](https://huggingface.co/docs/hub/collections). Collections can also be managed using the Python client (see [guide](https://huggingface.co/docs/huggingface_hub/main/en/guides/collections)).

Hugging Face Transformers collections 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 collections. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 14 operations across 9 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.

14 operations 9 paths 0 schemas 4 DELETE3 GET2 PATCH5 POST

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 collections API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated.

Paths & Operations 14

Across 9 paths, the API surfaces 14 operations — 4 DELETE, 3 GET, 2 PATCH, 5 POST. Each is listed below with its method, path, parameters, and response codes.

collections 14

Use Collections to group repositories from the Hub (Models, Datasets, Spaces and Papers) on a dedicated page. You can learn more about it in the Collections [guide](https://huggin…

GET
/api/collections/{namespace}/{slug}-{id}
Get a collection
3 params → 200
PATCH
/api/collections/{namespace}/{slug}-{id}
Update a collection
3 params body → 200
DELETE
/api/collections/{namespace}/{slug}-{id}
Delete a collection
3 params
GET
/api/collections/{namespace}/{slug}
Get a collection
2 params → 200
PATCH
/api/collections/{namespace}/{slug}
Update a collection
2 params body → 200
DELETE
/api/collections/{namespace}/{slug}
Delete a collection
2 params
POST
/api/collections/{namespace}/{slug}-{id}/items
Add item
3 params body → 200
POST
/api/collections/{namespace}/{slug}/items
Add item
2 params body → 200
POST
/api/collections/{namespace}/{slug}-{id}/items/batch
Batch update items
3 params body
POST
/api/collections/{namespace}/{slug}/items/batch
Batch update items
2 params body
DELETE
/api/collections/{namespace}/{slug}-{id}/items/{itemId}
Delete item
4 params
DELETE
/api/collections/{namespace}/{slug}/items/{slug}
Delete item
3 params
POST
/api/collections
Create a collection
body → 200409
GET
/api/collections
Get collections
7 params → 200

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hugging-face-transformers-collections-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 datasets API
Hugging Face Transformers discussions API
Hugging Face Transformers docs API
Hugging Face Transformers inference-endpoints API
Hugging Face Transformers jobs API