> For the complete documentation index, see [llms.txt](https://dnotifier.gitbook.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dnotifier.gitbook.io/product-docs/ai/multi-models/hugging-face-integration.md). Agents can also search and read this documentation through its [MCP server](https://dnotifier.gitbook.io/product-docs/~gitbook/mcp).

# Hugging Face integration

`provider` value: `hugging_face`

Use this when you want a Hub model (Llama, Mistral, …) behind the same `sendAI` API. Drop a Hugging Face token into the portal connection, enable the models you care about, then pass the **full hub id** as `model`.

Example id shape: `meta-llama/Meta-Llama-3-8B-Instruct` — copy/paste from the portal or the Hub, don't invent a short alias unless your connection defines one.

## Portal

**Projects** (pick the project) → **AI Studio** → **Providers** → **Hugging Face** → token (+ any extra fields) → save.

## Example calls

{% tabs %}
{% tab title="JavaScript" %}

```js
await notifier.sendAI({
  senderId: USER_ID,
  provider: "hugging_face",
  model: "meta-llama/Meta-Llama-3-8B-Instruct",
  message: {
    messages: [{ role: "user", content: "Explain RAG in one paragraph." }],
  },
  saveHistory: false,
});
```

{% endtab %}

{% tab title="Python" %}

```python
await notifier.send_ai(
    sender_id=user_id,
    provider="hugging_face",
    model="meta-llama/Meta-Llama-3-8B-Instruct",
    message={
        "messages": [{"role": "user", "content": "Explain RAG in one paragraph."}],
    },
    save_history=False,
)
```

{% endtab %}

{% tab title="Dart" %}

```dart
await notifier.sendAI(
  senderId: userId,
  provider: 'hugging_face',
  model: 'meta-llama/Meta-Llama-3-8B-Instruct',
  message: {
    'messages': [
      {'role': 'user', 'content': 'Explain RAG in one paragraph.'},
    ],
  },
  saveHistory: false,
);
```

{% endtab %}
{% endtabs %}

While you're poking at large open models, `saveHistory: false` keeps noise out of product history.

[Overview](https://dnotifier.gitbook.io/product-docs/ai/multi-models.md) · [Ollama](https://dnotifier.gitbook.io/product-docs/ai/multi-models/ollama-local-integration.md) if you prefer fully local instead of Hub inference.
