API template library

Simulate the Hugging Face Hub API

A WireMock simulation of Hugging Face's REST API — covering model, dataset and Space repos with branches, commits and discussions, gated access, collections, buckets, jobs, organizations, webhooks, and SCIM provisioning.

Vendor
Hugging Face
Functionality
Repos, discussions, collections, jobs
Spec version
0.0.1
Endpoints
374
Stubs
675
Protocol
REST
Validation
AI-validated Before publication, an AI agent exercised these endpoints against the real Hugging Face API through WireMock's recording proxy, and the recorded traffic was used to verify each stub's request and response shapes.

Live sandbox · no signup, no API key

Hugging Face Hub API

A running WireMock Cloud instance of this template, callable right now from a terminal, a script, or an AI agent.

Base URL
https://vmw4qk.wiremockapi.cloud

GET Get resource group settings [getApiOrganizationsByNameResourceGroupsSettings]

curl -s -X GET 'https://vmw4qk.wiremockapi.cloud/api/organizations/your-name/resource-groups/settings'

POST Update resource group settings [postApiOrganizationsByNameResourceGroupsSettings]

curl -s -X POST 'https://vmw4qk.wiremockapi.cloud/api/organizations/your-name/resource-groups/settings' \
  -H 'Content-Type: application/json' \
  -d '{}'

DELETE Delete notifications [deleteApiNotifications]

curl -s -X DELETE 'https://vmw4qk.wiremockapi.cloud/api/notifications'
Method Path Summary
POST /{namespace}/{repo}/ask-access Request access
GET /{namespace}/{repo}/resolve/{rev}/{path} Resolve a file
GET /{namespace}/{repo}/user-access-report Export access report
GET /api/{repoType}/{namespace}/{repo}/discussions List discussions
POST /api/{repoType}/{namespace}/{repo}/discussions Create discussion
DELETE /api/{repoType}/{namespace}/{repo}/discussions/{num} Delete a discussion
GET /api/{repoType}/{namespace}/{repo}/discussions/{num} Get discussion details
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/comment Create comment
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/comment/{commentId}/edit Update a comment
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/comment/{commentId}/hide Hide comment
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/comment/{commentId}/reaction React to comment
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/ignore Toggle ignore discussion
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/merge Merge pull request
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/pin Pin a discussion
DELETE /api/{repoType}/{namespace}/{repo}/discussions/{num}/ref Delete PR ref
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/status Change status
GET /api/{repoType}/{namespace}/{repo}/discussions/{num}/storage PR storage estimate
POST /api/{repoType}/{namespace}/{repo}/discussions/{num}/title Change title
POST /api/{repoType}/{namespace}/{repo}/duplicate Duplicate a repository
GET /api/{repoType}/{namespace}/{repo}/duplicate/status Duplication status
POST /api/{repoType}/{namespace}/{repo}/sql-console/embed Create embed
DELETE /api/{repoType}/{namespace}/{repo}/sql-console/embed/{id} Delete embed
PATCH /api/{repoType}/{namespace}/{repo}/sql-console/embed/{id} Update embed
POST /api/{repoType}/{namespace}/{repo}/sql-console/embed/{id}/hide Hide embed
GET /api/agent-harnesses Get agent harnesses
GET /api/avatars/{namespace} Get avatar
POST /api/blog/{namespace}/{slug}/comment Create comment
POST /api/blog/{namespace}/{slug}/comment/{commentId}/edit Update a comment
POST /api/blog/{namespace}/{slug}/comment/{commentId}/hide Hide comment
POST /api/blog/{namespace}/{slug}/comment/{commentId}/reaction React to comment
POST /api/blog/{namespace}/{slug}/comment/{commentId}/reply Create comment
GET /api/blog/{namespace}/{slug}/resource-group Blog resource group
POST /api/blog/{namespace}/{slug}/resource-group Blog resource group
POST /api/blog/{slug}/comment Create comment
POST /api/blog/{slug}/comment/{commentId}/edit Update a comment
POST /api/blog/{slug}/comment/{commentId}/hide Hide comment
POST /api/blog/{slug}/comment/{commentId}/reaction React to comment
POST /api/blog/{slug}/comment/{commentId}/reply Create comment
GET /api/blog/zh List blogs
GET /api/buckets/{namespace} List namespace buckets
DELETE /api/buckets/{namespace}/{repo} Delete bucket
GET /api/buckets/{namespace}/{repo} Get bucket details
POST /api/buckets/{namespace}/{repo} Create bucket
POST /api/buckets/{namespace}/{repo}/batch Batch file operations
GET /api/buckets/{namespace}/{repo}/events Follow changes
POST /api/buckets/{namespace}/{repo}/lfs-files/duplicate Duplicate xet files
POST /api/buckets/{namespace}/{repo}/paths-info List paths info
GET /api/buckets/{namespace}/{repo}/resource-group Get resource group
POST /api/buckets/{namespace}/{repo}/resource-group Add resource group
PUT /api/buckets/{namespace}/{repo}/settings Update bucket settings
GET /api/buckets/{namespace}/{repo}/tree/{path} List files
GET /api/buckets/{namespace}/{repo}/xet-read-token Xet read token
GET /api/buckets/{namespace}/{repo}/xet-write-token Xet write token
GET /api/collections Get collections
POST /api/collections Create a collection
DELETE /api/collections/{namespace}/{slug} Delete a collection
GET /api/collections/{namespace}/{slug} Get a collection
PATCH /api/collections/{namespace}/{slug} Update a collection
DELETE /api/collections/{namespace}/{slug}-{id} Delete a collection
GET /api/collections/{namespace}/{slug}-{id} Get a collection

+314 more endpoints in the full spec.

Unauthenticated WireMock Cloud demo sandbox for Hugging Face — not an official Hugging Face sandbox, and it returns simulated example data only.

What's inside the Hub template

The template covers the REST API behind huggingface.co, the one the huggingface_hub client wraps. Creating a repo stores it under its namespace with a clean history: refs list the implicit main branch plus any you add, and commits made through the commit route join the log. Unknown repos answer 404 on every repo-scoped call, including tree and resolve reads. Tooling that creates repos, opens pull requests and manages access can run its whole flow against it.

  • Repositories — models, datasets and Spaces with settings, branches, tags, commits, super-squash, moves and Space duplication
  • Discussions and pull requests — numbered per repo, with comments, status and title events, reactions, merging and pinning
  • Gated access — access requests that can be handled, granted, batched and cancelled, filtered by status
  • Collections and buckets — collections addressable by both path forms with items of every type, plus storage buckets and container repos
  • Jobs and scheduled jobs — jobs that run, cancel and duplicate, and schedules that record their last job
  • Organizations and identity — resource groups, members and invitations, service accounts and tokens, SCIM users and groups, webhooks

Hugging Face Hub mock API FAQ

No. Commits are recorded, but their uploaded content isn't parsed, and file, tree and LFS reads return samples. Test repo management here; test downloads of real weights against the Hub.

Likers lists, paper and full-text search, featured and semantic Space search, and provider model listings were recorded from huggingface.co. Other catalogs and reports, such as trending, hardware and billing, answer schema-valid samples.

No token is checked, although the real API requires one on most routes. Never send a real hf_ token to the shared sandbox; anything you create there is visible to other callers, and the store isn't reset on a schedule.

No. The spec documents 409 conflicts for some creates, but the template doesn't return them, so test name collisions against your own copy with a 409 stub added.

Vendor names identify APIs represented by WireMock template sources. This page does not imply vendor endorsement, certification, partnership, or official integration status.