# AI Connections

> AI connections let Mailrith draft content with your own provider account. This guide explains providers, API key and OAuth setup, workspace assignments, default models, connection statuses, and repair flows.

- Human page: https://mailrith.com/docs/ai-connections
- Markdown page: https://mailrith.com/docs/ai-connections.md
- Category: AI Writing
- Reading time: 9 min read
- Last updated: 2026-06-13
- Related keywords: AI Connections, AI Connections documentation, AI Writing, AI Writing documentation, Mailrith documentation, Mailrith help, What AI Connections Are, Create a Connection, Workspace Defaults, Connection Statuses, Repair, Delete, and Safety, Billing and Plans, Broadcasts

## AI Agent Notes
- Use this article as step-by-step Mailrith product guidance, not as legal, financial, or deliverability advice unless the article says so.
- Preserve exact Mailrith UI labels from the steps when explaining a workflow.
- Prefer Mailrith's product term Subscribers when referring to people on an email list.

## What this guide covers
Connect OpenAI, Claude, or OpenRouter, assign provider accounts to workspaces, choose default models, and repair failed connections.

## Sections
- What AI Connections Are
- Create a Connection
- Workspace Defaults
- Connection Statuses
- Repair, Delete, and Safety

## What AI Connections Are

AI connections let Mailrith use your AI provider account to draft email, landing page, and automation content. Mailrith stores each connection, gives selected workspaces access to it, and lets each workspace choose a default connection and model.

Mailrith supports OpenAI, Claude, and OpenRouter for AI writing connections. You can connect OpenRouter with an API key, or you can use the OpenRouter OAuth flow when that option is available.

AI connections are available on paid plans. If a workspace no longer has paid access, you can still open AI Connections to view and delete existing connections. You cannot create new connections, edit existing connections, reconnect OAuth, or save workspace defaults until the workspace has paid access again. To enable the feature, review [Billing and Plans](https://mailrith.com/docs/billing-and-plans.md).

## Create an AI Connection

1. Click **AI Connections** in the left sidebar.
2. Click **Create AI Connection**.
3. In the connection drawer, select a **Provider**: **OpenAI**, **Claude**, or **OpenRouter**.
4. If you select OpenRouter, choose a **Connection Method**: **API Key** or **OAuth**.
5. Enter a clear **Connection Name** so teammates can identify this connection later.
6. For API key connections, paste the provider key into **OpenAI API Key**, **Claude API Key**, or **OpenRouter API Key**.
7. For OpenRouter OAuth, click **Continue to OpenRouter**, then finish the authorization flow in OpenRouter.
8. Use **Workspace Access** to select each workspace that can use this connection.
9. Click **Connect OpenAI**, **Connect Claude**, or **Connect OpenRouter**, depending on the provider you selected.

Use a name such as "Company OpenAI Production" or "Agency OpenRouter Shared." A clear name helps teammates choose the correct connection and helps owners identify which provider account receives the AI charges.

If the workspace is on a free plan, the **Create AI Connection** button is not available. You can delete an old connection from the existing connections table if you need to clean up access.

## Workspace Defaults

After you create a connection, choose a default connection and model for each workspace that should use AI writing. Mailrith preselects the default when someone opens [AI Writing](https://mailrith.com/docs/ai-writing.md) in a broadcast, sequence, landing page, or automation.

1. On the **AI Connections** page, scroll to **Workspace AI Writing Defaults**.
2. Find the workspace row that you want to configure.
3. Choose the default connection in **Default Connection**.
4. Choose the default model in **Default Model**. The field shows recommended models first. Type in the field to search for more supported models from the same provider.
5. Click **Save** in the defaults area.

Defaults apply to one workspace at a time. This is useful when one Mailrith account manages multiple brands or clients. Each [Workspace](https://mailrith.com/docs/workspaces.md) can use a different provider account, a different model, or no AI default.

If you remove a workspace from a connection, Mailrith clears any workspace defaults that used that connection. The workspace then cannot keep using a connection that it can no longer access.

## Available Models

Mailrith shows recommended models first for each AI provider. Users can search the model field to find more supported models from the shared catalog. The catalog is shared across Mailrith, so every workspace uses the same supported OpenAI, Claude, and OpenRouter models instead of checking the provider separately for each user.

Admins can refresh the model list when providers release new writing models. Go to **System Settings**, find **AI Model Catalog**, then click **Refresh Models**. Mailrith keeps the current supported list available if a provider cannot be reached during the refresh.

OpenAI and Claude refreshes need catalog API keys to be set up for the Mailrith API worker. These keys are only used to read provider model lists. If a key is missing, Mailrith skips that provider during refresh and keeps the current models available.

Mailrith automatically makes clearly supported writing models available and keeps unsupported models out of user model lists. Some newly found models may still need admin review when the provider name or details are unclear. In **AI Model Catalog**, review the models marked **Needs Review**, then click **Approve** to make a model available or **Hide** to keep it out of user model lists. If a model was hidden by mistake, use **Search Hidden Models** to find it by model name or ID, then click **Make Available**.

If a provider has no supported models available, the model field explains that an admin should refresh the AI model catalog. Choose another provider or refresh the catalog before saving that workspace default.

## Connection Statuses

- **Active:** Mailrith can use the connection for AI drafting.
- **Needs attention:** recent provider failures mean you should review the connection. Common causes include invalid credentials, expired authorization, quota problems, or repeated provider errors.
- **Revoked:** the connection can no longer be used. Revoked rows stay visible for history, but they are read-only and cannot be selected for new defaults.

A connection can change to Needs attention when the provider rejects Mailrith requests. To repair the connection, edit it and update the API key, or reconnect the OAuth provider.

## Repair, Delete, and Use Safely

If AI drafting fails inside a broadcast, sequence, landing page, or automation, Mailrith can link you to the AI Connections page and open the affected connection for repair. After you repair the connection, return to the draft and try AI drafting again.

Deleting a connection removes the connection from use and clears workspace defaults that used it. Existing email content that you already generated stays in your drafts because Mailrith treats applied AI output as normal email content.

- Use provider keys that belong to the organization, not a temporary personal account.
- Assign connections only to workspaces that are allowed to use that provider account.
- Review provider billing and usage outside Mailrith so you understand AI costs.
- Do not paste provider keys into campaign copy, support chats, or shared documents.

## Related Guides
- [AI Writing](https://mailrith.com/docs/ai-writing.md): AI writing creates drafts, not final sends. This guide explains where AI appears, how to write a clear brief, how to preview generated content, when replacement confirmations appear, and how to repair provider failures.
- [Billing and Plans](https://mailrith.com/docs/billing-and-plans.md): Billing shows your workspace plan, the limits included in the plan, where to start checkout, how Agency add-ons work, and where to manage an existing subscription.
- [Broadcasts](https://mailrith.com/docs/broadcasts.md): Use broadcasts for newsletters, product launches, announcements, and any message you send once to selected subscribers. Compose, target, test, and send or schedule the campaign in one workflow.
