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

The following endpoints manage discussions.

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

This API exposes 20 operations across 18 paths, and defines 1 schema. It is described by OpenAPI 3.1.0, at version 0.0.1.

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

20 operations 18 paths 1 schemas 3 DELETE3 GET14 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 discussions API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated.

Paths & Operations 20

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

discussions 20

The following endpoints manage discussions.

POST
/api/blog/{slug}/comment
Create a new comment
1 param body → 201
POST
/api/blog/{slug}/comment/{commentId}/reply
Create a new comment
2 params body → 201
POST
/api/blog/{namespace}/{slug}/comment
Create a new comment
2 params body → 201
POST
/api/blog/{namespace}/{slug}/comment/{commentId}/reply
Create a new comment
3 params body → 201
GET
/api/{repoType}/{namespace}/{repo}/discussions
List discussions
9 params → 200
POST
/api/{repoType}/{namespace}/{repo}/discussions
Create a new discussion
3 params body → 200
GET
/api/{repoType}/{namespace}/{repo}/discussions/{num}
Get discussion details
4 params → 200
DELETE
/api/{repoType}/{namespace}/{repo}/discussions/{num}
Delete a discussion
4 params
POST
/api/{repoType}/{namespace}/{repo}/discussions/{num}/comment
Create a new comment
4 params body → 201
POST
/api/{repoType}/{namespace}/{repo}/discussions/{num}/status
Change status
4 params body → 200
POST
/api/{repoType}/{namespace}/{repo}/discussions/{num}/title
Change title
4 params body → 200
POST
/api/{repoType}/{namespace}/{repo}/discussions/{num}/pin
Pin a discussion
4 params body
POST
/api/{repoType}/{namespace}/{repo}/discussions/{num}/merge
Merge a pull request
4 params body
DELETE
/api/{repoType}/{namespace}/{repo}/discussions/{num}/ref
Delete PR ref
4 params
GET
/api/{repoType}/{namespace}/{repo}/discussions/{num}/storage
PR storage estimate
4 params → 200
POST
/api/papers/{paperId}/comment
Create a new comment
1 param body → 201
POST
/api/papers/{paperId}/comment/{commentId}/reply
Create a new comment
2 params body → 201
DELETE
/api/posts/{username}/{postSlug}
Delete a discussion
2 params
POST
/api/posts/{username}/{postSlug}/comment
Create a new comment
2 params body → 201
POST
/api/posts/{username}/{postSlug}/comment/{commentId}/reply
Create a new comment
3 params body → 201

Schemas 1

The contract defines 1 schema that model the data the API accepts and returns. The most detailed is RepoId (2 properties). Each schema is shown below with its type and property counts.

RepoId
object
2 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

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