HuggingFace Hub API integration
Repository management API for the Hugging Face Hub. Browse, search, and manage models, datasets, and spaces. Create, delete, and move repositories. Access metadata for millions of ML artifacts.
Say what should happen.
The workflow builds itself.
Common HuggingFace Hub API use cases
- Build filter UI
- Discover tag categories
- Publish models
- Model discovery
- Space discovery
- Dataset discovery
- Remove old models
- Track discussions
- List model versions
- Model documentation
What you can do with HuggingFace Hub API
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Repo, 5 operations
create_repoCreate repoPOSTCreates a new repository for models, datasets, or spaces.delete_repoDelete repoDELETEPermanently deletes a repository from Hugging Face Hub.get_trendingGet trendingGETRetrieves currently trending repositories on the Hub.move_repoMove repoPOSTMoves or renames a repository on Hugging Face Hub.update_repo_settingsUpdate repo settingsPUTUpdates repository settings such as visibility and access gating.
Dataset, 2 operations
get_dataset_infoGet dataset infoGETRetrieves detailed metadata for a specific dataset.list_datasetsList datasetsGETLists available datasets from the Hugging Face Hub.
Model, 2 operations
get_model_infoGet model infoGETRetrieves detailed metadata for a specific model.list_modelsList modelsGETLists available models from the Hugging Face Hub with filtering and search.
Space, 2 operations
get_space_infoGet space infoGETRetrieves detailed metadata for a specific Space.list_spacesList spacesGETLists available Spaces from the Hugging Face Hub.
Tag, 2 operations
get_dataset_tagsGet dataset tagsGETRetrieves all available dataset tags grouped by type.get_model_tagsGet model tagsGETRetrieves all available model tags grouped by type.
Discussion, 1 operation
list_discussionsList discussionsGETLists discussions and pull requests for a repository.
File, 1 operation
list_repo_filesList repo filesGETLists files and folders in a repository tree.
Ref, 1 operation
list_repo_refsList repo refsGETLists branches, tags, and optionally pull requests for a repository.
User, 1 operation
whoamiWhoamiGETReturns the authenticated user's account information.
Use HuggingFace Hub API from Claude Code, Cursor or Codex
Connect HuggingFace Hub API in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its HuggingFace Hub API operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect HuggingFace Hub API
- Create your workspace
Sign up free. Nothing to install.
- Connect HuggingFace Hub API once
Add your HuggingFace Hub API connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
HuggingFace Hub API integration FAQ
What can you do with the HuggingFace Hub API integration?
LiveContext exposes 17 operations on HuggingFace Hub API, covering repo, dataset, model and space. Common uses include Build filter UI, Discover tag categories and Publish models.
