---
source: https://iinventedlight.com/library/notes/hf-gated-repos.md
title: "Gated models and datasets on the Hugging Face Hub"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (huggingface docs repos); prose restates cited source lines"
attribution: "Summary by iinventedlight (AI-assisted). Sources: Hugging Face docs, Gated datasets · Hugging Face, Apache-2.0 (huggingface docs repos); Hugging Face docs, Gated models · Hugging Face, Apache-2.0 (huggingface docs repos)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-ai-eng: Hugging Face"
tags: ['hugging-face', 'hub', 'access-control', 'datasets']
sources:
  - id: S1
    title: "Gated datasets · Hugging Face"
    publisher: Hugging Face docs
    url: https://huggingface.co/docs/hub/datasets-gated
    accessed: 2026-11-04
    license: "Apache-2.0 (huggingface docs repos)"
  - id: S2
    title: "Gated models · Hugging Face"
    publisher: Hugging Face docs
    url: https://huggingface.co/docs/hub/models-gated
    accessed: 2026-11-04
    license: "Apache-2.0 (huggingface docs repos)"
---
# Gated models and datasets on the Hugging Face Hub

**Answer:** A gated repo makes users request access, sharing their username and email and answering any custom questions, before they can download files. Repos are not gated by default.

## Setting up

1. Open the model or dataset settings page.
2. Click **Enable Access request**.
3. Choose **automatic** (instant) or **manual** approval.

## Reviewing requests

**Review access requests** opens lists of pending, accepted and rejected users. You can automate the approval of access requests by using the API. (S1)

## As a user


```bash
hf auth login
```

```python
from huggingface_hub import snapshot_download
snapshot_download("org/gated-model", token=True)
```


## Claims
- id: C1
  claim: By default, the dataset is not gated.
  source: S1
  evidence: "By default, the dataset is not gated."
- id: C2
  claim: Manual approval lets you choose which users can access the dataset.
  source: S1
  evidence: "If you want to manually approve which users can access your dataset"
- id: C3
  claim: Requests can be managed from the UI or via the API.
  source: S1
  evidence: "You can review and manage requests either from the UI or via the API."
- id: C4
  claim: By default, the model is not gated.
  source: S2
  evidence: "By default, the model is not gated."

## Sources
- [S1] Gated datasets · Hugging Face. Hugging Face docs. https://huggingface.co/docs/hub/datasets-gated . License: Apache-2.0 (huggingface docs repos). Accessed 2026-11-04.
- [S2] Gated models · Hugging Face. Hugging Face docs. https://huggingface.co/docs/hub/models-gated . License: Apache-2.0 (huggingface docs repos). Accessed 2026-11-04.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
