> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Hugging Face

> Search models and datasets on the Hugging Face Hub and run chat completions via Inference Providers

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key comes from `HF_TOKEN`.
* **Docs**: [https://huggingface.co/docs/hub/security-tokens](https://huggingface.co/docs/hub/security-tokens)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable   | Required | Description                                                                                  |
| ---------- | -------- | -------------------------------------------------------------------------------------------- |
| `HF_TOKEN` | Yes      | Hugging Face access token (starts with hf\_) [Docs](https://huggingface.co/settings/tokens). |

## Setup

1. **Create a Hugging Face account**: Go to [https://huggingface.co](https://huggingface.co) and sign up or sign in. Hub API access and a generous Inference Providers free tier are available without billing.
2. **Create an access token**: Open [https://huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) and create a fine-grained token. Enable 'Make calls to Inference Providers' if you want to use the chat completion tool; read access covers the Hub search tools.
3. **Store the token**: Copy the token and add it to your .env file as HF\_TOKEN=hf\_...
4. **Verify access**: Run the Who Am I tool to confirm the token works and shows the expected permissions.

* Hub search endpoints work with read-scoped tokens; chat completions require the Inference Providers permission
* Inference Providers usage beyond the free tier is billed at provider rates with no markup; PRO accounts include monthly credits
* Some gated models (e.g. meta-llama) require accepting their license on the Hub before access

Provider API reference: [https://huggingface.co/docs/hub/api](https://huggingface.co/docs/hub/api)

## Tools

| Tool                   | Access | Description                                                                                        |
| ---------------------- | ------ | -------------------------------------------------------------------------------------------------- |
| Search Models          | Read   | Search models on the Hugging Face Hub                                                              |
| Get Model              | Read   | Get details about a model repository on the Hub                                                    |
| Search Datasets        | Read   | Search datasets on the Hugging Face Hub                                                            |
| Who Am I               | Read   | Get the account and permissions associated with the access token                                   |
| Create Chat Completion | Write  | Generate a chat completion through the Hugging Face Inference Providers router (OpenAI-compatible) |

## Example prompts

* Search the Hugging Face Hub for trending models for a task I describe and summarize the top results.
* Use Hugging Face Inference Providers to generate a response from an open model I pick.
