Skip to content

Sunset API docs in favor of OpenAPI playground#2101

Merged
Wauplin merged 1 commit into
mainfrom
sunset-api-docs
Dec 10, 2025
Merged

Sunset API docs in favor of OpenAPI playground#2101
Wauplin merged 1 commit into
mainfrom
sunset-api-docs

Conversation

@Wauplin

@Wauplin Wauplin commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

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

julien-c commented Dec 9, 2025

Copy link
Copy Markdown
Member

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

@julien-c

julien-c commented Dec 9, 2025

Copy link
Copy Markdown
Member

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

Wauplin commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

(will merge tomorrow unless someone's against)

@merveenoyan

merveenoyan commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Comment thread docs/hub/api.md
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
Copy Markdown
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

julien-c commented Dec 9, 2025

Copy link
Copy Markdown
Member

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

coyotte508 commented Dec 9, 2025

Copy link
Copy Markdown
Member

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

@Wauplin

Wauplin commented Dec 10, 2025

Copy link
Copy Markdown
Contributor Author

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.

5 participants