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.
Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.
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 repoPOSTAgents: ask firstCreates a new repository for models, datasets, or spaces.delete_repoDelete repoDELETEAgents: ask firstPermanently deletes a repository from Hugging Face Hub.get_trendingGet trendingGETAgents: ask firstRetrieves currently trending repositories on the Hub.move_repoMove repoPOSTAgents: ask firstMoves or renames a repository on Hugging Face Hub.update_repo_settingsUpdate repo settingsPUTAgents: ask firstUpdates repository settings such as visibility and access gating.
Dataset, 2 operations
get_dataset_infoGet dataset infoGETAgents: ask firstRetrieves detailed metadata for a specific dataset.list_datasetsList datasetsGETAgents: ask firstLists available datasets from the Hugging Face Hub.
Model, 2 operations
get_model_infoGet model infoGETAgents: ask firstRetrieves detailed metadata for a specific model.list_modelsList modelsGETAgents: ask firstLists available models from the Hugging Face Hub with filtering and search.
Space, 2 operations
get_space_infoGet space infoGETAgents: ask firstRetrieves detailed metadata for a specific Space.list_spacesList spacesGETAgents: ask firstLists available Spaces from the Hugging Face Hub.
Tag, 2 operations
get_dataset_tagsGet dataset tagsGETAgents: ask firstRetrieves all available dataset tags grouped by type.get_model_tagsGet model tagsGETAgents: ask firstRetrieves all available model tags grouped by type.
Discussion, 1 operation
list_discussionsList discussionsGETAgents: ask firstLists discussions and pull requests for a repository.
File, 1 operation
list_repo_filesList repo filesGETAgents: ask firstLists files and folders in a repository tree.
Ref, 1 operation
list_repo_refsList repo refsGETAgents: ask firstLists branches, tags, and optionally pull requests for a repository.
User, 1 operation
whoamiWhoamiGETAgents: ask firstReturns 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.
