HubCloneHubClone
Hub / Hub API Endpoints

Join the HubClone community

and get access to the augmented documentation experience

  • Collaborate on models, datasets and Spaces
  • Faster examples with accelerated inference
  • Switch between documentation themes

to get started

Hub API Endpoints

The Hub exposes an HTTP API used by the client libraries. You can call it directly for simple integrations; authenticate with a User Access Token in the Authorization header.

Repo listing API

MethodEndpointReturns
GET/api/modelsModels matching search, author, filter, sort
GET/api/datasetsDatasets with the same parameters
GET/api/spacesSpaces with the same parameters
GET/api/models/{repo_id}Metadata of one model
curl "https://hubclone.local/api/models?search=atlas&sort=downloads&limit=5"

Repo management API

MethodEndpointAction
POST/api/repos/createCreate a repository
DELETE/api/repos/deleteDelete a repository
PUT/api/repos/{type}/{repo_id}/settingsChange visibility or gating
POST/api/repos/moveRename or transfer a repository

User and organization API

GET /api/whoami-v2 returns the account behind the token, including the organizations it belongs to. Use it to check that a token is valid.

Tip:

The API is rate limited. Prefer the client libraries, which retry and paginate for you.