> 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/google-gemini-integration.md). Agents can also search and read this documentation through its [MCP server](https://dnotifier.gitbook.io/product-docs/~gitbook/mcp).

# Google Gemini integration

`provider` value: `google_gemini`

Gemini is handy when you want fast / cheap turns (classification, brainstorming) without leaving DNotifier. Connection details live in the portal — API key / Google project fields, or subscription if that's offered on your plan.

Pick a model id the connection actually lists, e.g. `gemini-2.0-flash` or a Pro variant.

## Setup

In the dashboard: **Projects** (pick the project) → **AI Studio** → **Providers** → **Google Gemini** → fill in what the form asks → save. Then from any language:

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

```js
await notifier.sendAI({
  senderId: USER_ID,
  provider: "google_gemini",
  model: "gemini-2.0-flash",
  message: {
    messages: [{ role: "user", content: "Three tagline ideas for a realtime SDK." }],
  },
  saveHistory: true,
});
```

{% endtab %}

{% tab title="Python" %}

```python
await notifier.send_ai(
    sender_id=user_id,
    provider="google_gemini",
    model="gemini-2.0-flash",
    message={
        "messages": [
            {"role": "user", "content": "Three tagline ideas for a realtime SDK."}
        ],
    },
    save_history=True,
)
```

{% endtab %}

{% tab title="Dart" %}

```dart
await notifier.sendAI(
  senderId: userId,
  provider: 'google_gemini',
  model: 'gemini-2.0-flash',
  message: {
    'messages': [
      {'role': 'user', 'content': 'Three tagline ideas for a realtime SDK.'},
    ],
  },
  saveHistory: true,
);
```

{% endtab %}
{% endtabs %}

A small brainstorm agent:

```js
const brainstorm = DNotifier.defineAgent({
  name: "brainstorm",
  provider: "google_gemini",
  model: "gemini-2.0-flash",
  async run(ctx) {
    return ctx.sendAI({
      message: { text: ctx.input.topic },
      saveHistory: false,
    });
  },
});
```

Mixed workflows work fine — Gemini for routing, Claude or GPT for the final answer. There's an example in [Research then write](https://dnotifier.gitbook.io/product-docs/tutorials/tutorials/research-then-write.md) / [Switch providers](https://dnotifier.gitbook.io/product-docs/tutorials/tutorials/switch-providers.md).

[Overview](https://dnotifier.gitbook.io/product-docs/ai/multi-models.md) · [Hugging Face](https://dnotifier.gitbook.io/product-docs/ai/multi-models/hugging-face-integration.md)
