Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Hugging Face Transformers spaces API

Get information from all Spaces on the Hub.

Hugging Face Transformers spaces API is one of 27 APIs that Hugging Face Transformers publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include spaces. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 40 operations across 32 paths. It is described by OpenAPI 3.1.0, at version 0.0.1.

Requests are made against a single base URL, https://huggingface.co.

40 operations 32 paths 0 schemas 6 DELETE21 GET11 POST2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
0.0.1
Base URL
https://api-inference.huggingface.co
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

Hugging Face Transformers spaces API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated.

Paths & Operations 40

Across 32 paths, the API surfaces 40 operations — 6 DELETE, 21 GET, 11 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

spaces 40

Get information from all Spaces on the Hub.

GET
/api/spaces/{namespace}/{repo}/treesize/{rev}/{path}
Get folder size
4 params → 200
GET
/api/spaces/{namespace}/{repo}/lfs-files
List Large files
5 params → 200
POST
/api/spaces/{namespace}/{repo}/lfs-files/batch
Delete Large files
2 params body
DELETE
/api/spaces/{namespace}/{repo}/lfs-files/{sha}
Delete Large file
4 params
POST
/api/spaces/{namespace}/{repo}/lfs-files/duplicate
Duplicate xet files
2 params body → 200207
GET
/api/spaces/{namespace}/{repo}/commits/{rev}
List commits
6 params → 200
GET
/api/spaces/{namespace}/{repo}/refs
List references
3 params → 200
GET
/api/spaces/{namespace}/{repo}/compare/{compare}
Get a compare rev
4 params → 200
POST
/api/spaces/{namespace}/{repo}/paths-info/{rev}
List paths info
3 params body → 200
POST
/api/spaces/{namespace}/{repo}/preupload/{rev}
Check upload method
3 params body → 200422
GET
/api/spaces/{namespace}/{repo}/xet-write-token/{rev}
Xet write token
3 params → 200
GET
/api/spaces/{namespace}/{repo}/xet-read-token/{rev}
Xet read token
3 params → 200
POST
/api/spaces/{namespace}/{repo}/commit/{rev}
Commit
6 params → 200
POST
/api/spaces/{namespace}/{repo}/tag/{rev}
Create tag
3 params body
DELETE
/api/spaces/{namespace}/{repo}/tag/{rev}
Delete a tag
3 params
POST
/api/spaces/{namespace}/{repo}/branch/{rev}
Create branch
3 params body
DELETE
/api/spaces/{namespace}/{repo}/branch/{rev}
Delete a branch
3 params
POST
/api/spaces/{namespace}/{repo}/resource-group
Add resource group
2 params body → 200
GET
/api/spaces/{namespace}/{repo}/resource-group
Get resource group
2 params → 200
POST
/api/spaces/{namespace}/{repo}/super-squash/{rev}
Squash ref
3 params body → 200
PUT
/api/spaces/{namespace}/{repo}/settings
Update repo settings
2 params body → 200
GET
/api/spaces/{namespace}/{repo}/tree/{rev}/{path}
List folder content
8 params → 200
GET
/api/spaces/{namespace}/{repo}/notebook/{rev}/{path}
Get notebook URL
4 params → 200
GET
/api/spaces/{namespace}/{repo}/scan
Get security status
2 params → 200
GET
/api/spaces/{namespace}/{repo}/jwt
Generate JWT
8 params → 200
GET
/api/trending
Get trending
2 params → 200
GET
/api/spaces/hardware
List space hardware
→ 200
POST
/api/spaces/{namespace}/{repo}/secrets
Upsert secret
2 params body
DELETE
/api/spaces/{namespace}/{repo}/secrets
Delete secret
2 params body
GET
/api/spaces/{namespace}/{repo}/secrets
List secrets
2 params → 200
POST
/api/spaces/{namespace}/{repo}/variables
Upsert variable
2 params body
DELETE
/api/spaces/{namespace}/{repo}/variables
Delete variable
2 params body
GET
/api/spaces/{namespace}/{repo}/variables
List variables
2 params → 200
GET
/spaces/{namespace}/{repo}/resolve/{rev}/{path}
Resolve a file
6 params → 200302304307
GET
/api/resolve-cache/spaces/{namespace}/{repo}/{rev}/{path}
Resolve a file
6 params → 200302304307
PUT
/api/spaces/{namespace}/{repo}/volumes
Set Space volumes
2 params body
DELETE
/api/spaces/{namespace}/{repo}/volumes
Delete Space volumes
2 params
GET
/api/spaces/{namespace}/{repo}/logs/{logType}
Stream logs
4 params
GET
/api/spaces/{namespace}/{repo}/events
Stream events
3 params
GET
/api/spaces/{namespace}/{repo}/metrics
Stream metrics
2 params

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hugging-face-transformers-spaces-api-openapi.yml Raw ↑

Other APIs Hugging Face Transformers publishes across the network.

Hugging Face Transformers Library
Hugging Face Inference API
Hugging Face Spaces API
Text Generation Inference (TGI)
Hugging Face Transformers agentic-provisioning API
Hugging Face Transformers auth API
Hugging Face Transformers buckets API
Hugging Face Transformers collections API
Hugging Face Transformers datasets API
Hugging Face Transformers discussions API
Hugging Face Transformers docs API
Hugging Face Transformers inference-endpoints API