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

# Azure AI integration

`provider` value: `azure_ai`

If your company already runs models on Azure OpenAI / AI Foundry, point DNotifier at that resource in the portal. The SDK call looks like OpenAI — the difference is `provider: "azure_ai"` and `model` is usually your **deployment name**, not the public OpenAI marketing name (they can match, but don't assume).

## What to put in the portal

Under **Projects → AI Studio → Providers → Azure AI** you'll typically enter:

* resource endpoint
* key or Entra-style auth (whatever the form shows)
* API version / region if asked
* which deployments are usable

Save that once. Apps only send `provider` + deployment name.

## Call it

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

```js
await notifier.sendAI({
  senderId: USER_ID,
  provider: "azure_ai",
  model: "gpt-4o", // deployment name in Azure
  message: {
    messages: [{ role: "user", content: "Draft a short out-of-office reply." }],
  },
  saveHistory: true,
});
```

{% endtab %}

{% tab title="Python" %}

```python
await notifier.send_ai(
    sender_id=user_id,
    provider="azure_ai",
    model="gpt-4o",  # deployment name
    message={
        "messages": [{"role": "user", "content": "Draft a short out-of-office reply."}],
    },
    save_history=True,
)
```

{% endtab %}

{% tab title="Dart" %}

```dart
await notifier.sendAI(
  senderId: userId,
  provider: 'azure_ai',
  model: 'gpt-4o', // deployment name
  message: {
    'messages': [
      {'role': 'user', 'content': 'Draft a short out-of-office reply.'},
    ],
  },
  saveHistory: true,
);
```

{% endtab %}
{% endtabs %}

Corp assistant that always stays on Azure + RAG:

```js
const corpAssistant = DNotifier.defineAgent({
  name: "corp-assistant",
  provider: "azure_ai",
  model: "gpt-4o",
  async run(ctx) {
    return ctx.sendAI({
      message: {
        useKnowledgeBase: true,
        messages: [{ role: "user", content: ctx.input.question }],
      },
    });
  },
});
```

404 / deployment errors almost always mean the portal `model` string doesn't match Azure. Compare against the portal list before chasing SDK bugs.

Compared to public OpenAI: [open-ai-integration.md](https://dnotifier.gitbook.io/product-docs/ai/multi-models/open-ai-integration.md). Overview: [README.md](https://dnotifier.gitbook.io/product-docs/ai/multi-models.md).
