---
title: "Add resource group"
method: POST
path: "/api/models/{namespace}/{repo}/resource-group"
tags: ["models"]
---

# Add resource group

`POST /api/models/{namespace}/{repo}/resource-group`

Add the repository to a resource group

## Path parameters

- `namespace` string, required
- `repo` string, required

## Request body

- object
  - `resourceGroupId` string, nullable, required — The resource group to add the repository to, if null, the repository will be removed from the resource group

## Response `200`

Minimal information about the repository

- object
  - `name` string, required
  - `type` 'dataset' | 'model' | 'space' | 'bucket' | 'kernel', required
  - `private` boolean, required
  - `addedBy` string, required

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/dae0cc3790f0/schema)
