Skip to content

Conversation

@Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Dec 9, 2025

This PR removes most of the content from https://huggingface.co/docs/hub/en/api and redirect user to the OpenAPI Playground which is much more future-proof: https://huggingface.co/spaces/huggingface/openapi.

Let's still keep the page, at least to avoid breaking external links.

(related to internal slack thread)


PR docs: https://moon-ci-docs.huggingface.co/docs/hub/pr_2101/en/api

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@julien-c
Copy link
Member

julien-c commented Dec 9, 2025

why not, i guess. cc @gary149 do you agree as well?

@julien-c
Copy link
Member

julien-c commented Dec 9, 2025

Maybe we could add a short discussion/examples of what you can build with the HF API. (given the OpenAPI spec is a bit "dry")

but we can do that in a later PR

(maybe @burtenshaw would have some ideas)

@Wauplin
Copy link
Contributor Author

Wauplin commented Dec 9, 2025

(will merge tomorrow unless someone's against)

@merveenoyan
Copy link
Contributor

merveenoyan commented Dec 9, 2025

Can Spaces content be consumed by MCP/LLM search tools etc as easy as having them inside Hub docs? 👀
re: cool things there's this on top of my head: https://huggingface.co/spaces/lvwerra/hf-review

@coyotte508
Copy link
Member

maybe we can link to https://huggingface.co/.well-known/openapi.json directly? cc @Wauplin

but yea eventually having a real API doc with several pages (and LLM support) would be nice

Want to try out our API?
Try it out now on our OpenAPI-based [Playground](https://huggingface.co/spaces/huggingface/openapi)!
> [!NOTE]
> We've moved the Hub API Endpoints documentation to our [OpenAPI Playground](https://huggingface.co/spaces/huggingface/openapi), which provides a comprehensive reference that's always up-to-date. You can also access the OpenAPI specification directly at [https://huggingface.co/.well-known/openapi.json](https://huggingface.co/.well-known/openapi.json).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can link to https://huggingface.co/.well-known/openapi.json directly?

already linking the openapi.json here (as done before)

@julien-c
Copy link
Member

julien-c commented Dec 9, 2025

we can either fork Scalar (or build our own version), or contribute to it to make sure it's LLM optimized (aka serving a .md file?)

OR just serve a https://huggingface.co/.well-known/openapi.md or https://huggingface.co/docs/hub/api.md file generated from moon

@coyotte508
Copy link
Member

coyotte508 commented Dec 9, 2025

well we'd probably want to split endpoints into mutiple pages for the LLM's context

@Wauplin
Copy link
Contributor Author

Wauplin commented Dec 10, 2025

Merging this one as the discussion around plain text / LLM-ready documentation is orthogonal

@Wauplin Wauplin merged commit db0ad3b into main Dec 10, 2025
2 checks passed
@Wauplin Wauplin deleted the sunset-api-docs branch December 10, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants