API template library

Simulate the Hugging Face Inference Endpoints API

A WireMock simulation of Hugging Face's REST API — covering the endpoint lifecycle from create to delete, pausing and scale-to-zero, audit logs, private networking and custom domains, metrics and logs, and provider catalogs.

Vendor
Hugging Face
Functionality
Endpoint lifecycle, audit logs, networking
Spec version
2.0.0
Endpoints
48
Stubs
82
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 Inference Endpoints API

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

Base URL
https://2mwdyw.wiremockapi.cloud

GET Get audit logs [READ] [PRO] [get_audit_logs]

curl -s -X GET 'https://2mwdyw.wiremockapi.cloud/v2/audit-logs/your-namespace'

POST Create endpoint [WRITE] [create_endpoint]

curl -s -X POST 'https://2mwdyw.wiremockapi.cloud/v2/endpoint/your-namespace' \
  -H 'Content-Type: application/json' \
  -d '{}'

GET List endpoints [READ] [list_endpoint]

curl -s -X GET 'https://2mwdyw.wiremockapi.cloud/v2/endpoint/your-namespace'
Method Path Summary
GET /v2/audit-logs/{namespace} Get audit logs [READ] [PRO]
GET /v2/endpoint/{namespace} List endpoints [READ]
POST /v2/endpoint/{namespace} Create endpoint [WRITE]
DELETE /v2/endpoint/{namespace}/{name} Delete endpoint [WRITE]
GET /v2/endpoint/{namespace}/{name} Get endpoint [READ]
PUT /v2/endpoint/{namespace}/{name} Update endpoint [WRITE]
POST /v2/endpoint/{namespace}/{name}/agent/debug Run debugger agent on endpoint [READ]
GET /v2/endpoint/{namespace}/{name}/logs Get endpoint logs [READ]
GET /v2/endpoint/{namespace}/{name}/logs/sse Get endpoint logs SSE [READ]
POST /v2/endpoint/{namespace}/{name}/metrics Get endpoint metrics [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/hardware-cpu Get endpoint hardware CPU and RAM [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/hardware-gpu Get endpoint hardware GPU and VRAM [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/inference/itl Get endpoint inference inter-token latency [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/inference/kv-cache Get endpoint inference KV cache usage [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/inference/prefix-cache Get endpoint inference prefix cache hit ratio [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/inference/requests Get endpoint inference requests waiting and running [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/inference/ttft Get endpoint inference time to first token [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/pending-request Get endpoint pending request [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/replica-ids Get endpoint replica ids [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/replica-running Get endpoint replica running [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/replica-status Get endpoint replica status [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/response-elapsed Get endpoint response elapsed [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/response-status-code Get endpoint response status code [READ]
POST /v2/endpoint/{namespace}/{name}/metrics/response-status-code-grouped Get endpoint response status code grouped [READ]
GET /v2/endpoint/{namespace}/{name}/open-metrics Get endpoint OpenMetrics export [READ] [PRO]
POST /v2/endpoint/{namespace}/{name}/pause Pause endpoint [WRITE]
GET /v2/endpoint/{namespace}/{name}/replica Get endpoint replicas [READ]
POST /v2/endpoint/{namespace}/{name}/resume Resume endpoint [WRITE]
POST /v2/endpoint/{namespace}/{name}/scale-to-zero Scale endpoint to zero [WRITE]
GET /v2/endpoint/{namespace}/{name}/sse Get endpoint events SSE [READ]
GET /v2/network/cidr-list/{namespace} List CIDRs [READ]
POST /v2/network/cidr-list/{namespace} Create CIDR [WRITE]
DELETE /v2/network/cidr-list/{namespace}/{cidr_id} Delete CIDR [WRITE]
POST /v2/network/cidr-list/{namespace}/{cidr_id} Update CIDR [WRITE]
GET /v2/network/domain/{namespace} List domains [READ]
POST /v2/network/domain/{namespace} Create domain [WRITE] [PRO]
DELETE /v2/network/domain/{namespace}/{domain} Delete domain [WRITE] [PRO]
GET /v2/network/private-service/{namespace} List private services [READ]
DELETE /v2/network/private-service/{namespace}/{service-id} Delete private service [WRITE]
GET /v2/provider List providers [PUBLIC]
GET /v2/provider/{namespace} List providers for namespace [READ]
GET /v2/provider/quotas/{namespace} List provider quotas [READ]
GET /v2/search/{namespace} Search endpoint names [READ]
GET /v2/search/{namespace}/states Count endpoints per state [READ]
GET /v2/search/{namespace}/tags List endpoint tags [READ]
GET /v3/endpoint/{namespace}/{name}/logs Get endpoint logs (structured, paginated) [READ]
GET /v3/endpoint/{namespace}/{name}/logs/download Download endpoint logs as plain text (kubectl-style) [READ]
GET /v3/endpoint/{namespace}/{name}/logs/sse Stream endpoint logs via SSE (structured) [READ]

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 Inference Endpoints template

The template mirrors the v2 management API at api.endpoints.huggingface.cloud. Endpoints are stored by name within a namespace: the create response shows the endpoint pending, the next read shows it running with one ready replica, and pausing drops it to paused with none. Each change appends an audit-log entry whose reason names what happened, such as endpointCreated or endpointPaused. Deployment scripts that wait for a running state and check replica counts complete against it in seconds.

  • Endpoint lifecycle — create, update with merged changes, pause, resume, scale to zero and delete
  • Search and status — name search, state counts across the namespace, tags and the replica view
  • Audit log — one entry per lifecycle change, filterable by endpoint, with an instance diff on updates
  • Networking — CIDR allow-lists, custom domains, and private services derived from endpoint settings
  • Logs and metrics — text, JSON and streamed logs, OpenMetrics output and the metrics time series for an existing endpoint
  • Providers — cloud vendors, regions, instance catalogs and quotas

Hugging Face Inference Endpoints mock API FAQ

No. No model is pulled and no hardware is reserved; the endpoint exists only as a stored document. The state transitions are what the template gives you, without the minutes a real cold start takes or the bill that comes with it.

404 with the body {"error": "Endpoint not found"}. CIDR lists, domains and private services answer the same way for their own resources, and an endpoint's logs, metrics and replicas do too once it's gone.

No. Logs, metrics and the status stream are fixed samples served for any existing endpoint. They're there to exercise dashboards and parsers, not to model traffic.

This one manages endpoints after they exist. The Hugging Face Endpoints catalog template covers the one-click catalog and its deploy routes, which live on a separate host.

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