Hugging Face Discussion API
One discussion or pull request with its whole timeline, from the opening comment to the latest status change.
GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/discussions/{number}1 credit Failed requests are free
About this endpoint
GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/discussions/{number} returns repo and discussion. The discussion has number, url, title, status, isPullRequest, pinned, createdAt, locked, isReport, author, optional pullRequest details and the events timeline, oldest first.
Events carry id, type, createdAt and author. Comment events add text, html, hidden, edited, editCount, isReport and reactions; status and title changes add newStatus or newTitle; commit events add commit.sha and commit.subject. A missing number returns lookupStatus: not_found.
Hugging Face Discussion API FAQ
What kinds of event are in the timeline?
Comments, status changes, commits, title changes and pinning changes. The type field names the kind and unknown kinds pass through as strings.
Where are the pull request details?
Read discussion.pullRequest for baseRef, diffUrl and conflictingFiles. It is null for a plain discussion.
What do hidden comments look like?
hidden is true and the text is absent, because a hidden comment has no readable body.
How much does a discussion lookup cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
Other Hugging Face endpoints
- Search modelsGET /v1/hugging-face/models
- Get modelGET /v1/hugging-face/models/{owner}/{name}
- Search datasetsGET /v1/hugging-face/datasets
- Get datasetGET /v1/hugging-face/datasets/{owner}/{name}
- Search SpacesGET /v1/hugging-face/spaces
- Get SpaceGET /v1/hugging-face/spaces/{owner}/{name}
- READMEGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme
- FilesGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/files