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
| Method | Endpoint | Returns |
|---|---|---|
| GET | /api/models | Models matching search, author, filter, sort |
| GET | /api/datasets | Datasets with the same parameters |
| GET | /api/spaces | Spaces 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
| Method | Endpoint | Action |
|---|---|---|
| POST | /api/repos/create | Create a repository |
| DELETE | /api/repos/delete | Delete a repository |
| PUT | /api/repos/{type}/{repo_id}/settings | Change visibility or gating |
| POST | /api/repos/move | Rename 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.