Get started free
All integrations

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.

17 toolsTokenAPI docs

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

  • POSTcreate_repo

    Creates a new repository for models, datasets, or spaces.

  • DELETEdelete_repo

    Permanently deletes a repository from Hugging Face Hub.

  • GETget_trending

    Retrieves currently trending repositories on the Hub.

  • POSTmove_repo

    Moves or renames a repository on Hugging Face Hub.

  • PUTupdate_repo_settings

    Updates repository settings such as visibility and access gating.

Dataset, 2 operations

  • GETget_dataset_info

    Retrieves detailed metadata for a specific dataset.

  • GETlist_datasets

    Lists available datasets from the Hugging Face Hub.

Model, 2 operations

  • GETget_model_info

    Retrieves detailed metadata for a specific model.

  • GETlist_models

    Lists available models from the Hugging Face Hub with filtering and search.

Space, 2 operations

  • GETget_space_info

    Retrieves detailed metadata for a specific Space.

  • GETlist_spaces

    Lists available Spaces from the Hugging Face Hub.

Tag, 2 operations

  • GETget_dataset_tags

    Retrieves all available dataset tags grouped by type.

  • GETget_model_tags

    Retrieves all available model tags grouped by type.

Discussion, 1 operation

  • GETlist_discussions

    Lists discussions and pull requests for a repository.

File, 1 operation

  • GETlist_repo_files

    Lists files and folders in a repository tree.

Ref, 1 operation

  • GETlist_repo_refs

    Lists branches, tags, and optionally pull requests for a repository.

User, 1 operation

  • GETwhoami

    Returns 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 Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect HuggingFace Hub API

  1. Create your workspace

    Sign up free. Nothing to install.

  2. 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.

  3. 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.

Popular integrations

Browse the whole catalog