Setting up HuggingFace authentication
Some pipelines use gated models on HuggingFace that require authentication to download. A HuggingFace token is also used to obtain Cloudflare TURN credentials for WebRTC connections behind firewalls. You can create a token at huggingface.co/settings/tokens. Scope supports two ways to provide your token: through the Settings UI or via an environment variable.Using the API Keys Tab
1
Open Settings
Click the gear icon in the app header to open the Settings dialog.
2
Navigate to API Keys
Select the API Keys tab.
3
Enter your token
Find the HuggingFace entry, paste your token into the field, and click the save button.
If the
HF_TOKEN environment variable is already set, the input field is disabled.Using an Environment Variable
Setting theHF_TOKEN environment variable is the preferred method for headless, cloud, and CI deployments.
- Linux / macOS
- Windows (PowerShell)
The environment variable takes precedence over a token stored through the UI.
When Is a Token Needed?
Troubleshooting
Authentication errors during model download
Authentication errors during model download
Verify that your token is set in Settings > API Keys or via the
HF_TOKEN environment variable.Token is set but downloads still fail
Token is set but downloads still fail
Ensure you have accepted the model’s license agreement on its HuggingFace page. Gated models might require explicit approval before access is granted.
WebRTC connection issues behind firewalls
WebRTC connection issues behind firewalls
Without a valid HuggingFace token, Scope cannot obtain Cloudflare TURN credentials and falls back to STUN-only mode. Set your token and restart Scope to enable TURN-based NAT traversal.
See Also
Quick Start
Get Scope running and generate your first AI video
System Requirements
GPU, RAM, and OS requirements per pipeline