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

# OpenAI

> Configure OpenAI to power blog content creation and email generation in Notifuse.

<img src="https://mintcdn.com/notifuse/un7T4x9Px34Dh1Dm/assets/integrations/openai.png?fit=max&auto=format&n=un7T4x9Px34Dh1Dm&q=85&s=681be43a4e3313c289544934ed57d024" alt="OpenAI" style={{ height: '24px' }} width="1207" height="379" data-path="assets/integrations/openai.png" />

The OpenAI integration enables AI-powered features across Notifuse using GPT models. This integration powers the AI agent for blog content creation and email generation.

## Configuration

Navigate to **Settings** → **Integrations** → **Add Integration** → **OpenAI**.

### Form Fields

| Field       | Description                 | Example       |
| ----------- | --------------------------- | ------------- |
| **API Key** | Your OpenAI API key         | `sk-proj-...` |
| **Model**   | Select the GPT model to use | `gpt-4.1`     |

### Available Models

| Model            | Description                                                 | \$ Pricing (per MTok)      |
| ---------------- | ----------------------------------------------------------- | -------------------------- |
| **GPT-4.1**      | Most capable model for complex reasoning and creative tasks | $2 input / $8 output       |
| **GPT-4.1 mini** | Balanced performance and cost for most use cases            | $0.40 input / $1.60 output |
| **GPT-4.1 nano** | Fast and cost-effective for simpler tasks                   | $0.10 input / $0.40 output |

## Features Enabled

Once configured, the OpenAI integration enables the following AI-powered features:

### Blog AI Agent

The AI agent can assist with blog content creation:

| Feature              | Description                                                                 |
| -------------------- | --------------------------------------------------------------------------- |
| **Write blog posts** | Generate complete blog articles based on topics or brief descriptions       |
| **SEO optimization** | Automatically generate SEO-friendly meta titles, descriptions, and keywords |
| **Content editing**  | Improve, expand, or summarize existing content                              |

### Email Editor AI

Generate emails automatically using AI:

| Feature                | Description                                             |
| ---------------------- | ------------------------------------------------------- |
| **Email generation**   | Create email content from prompts or descriptions       |
| **Subject lines**      | Generate compelling subject lines for better open rates |
| **Content variations** | Create multiple versions for A/B testing                |

## Enhanced with Firecrawl

The OpenAI AI agent can be enhanced by adding the [Firecrawl integration](/integrations/firecrawl). This gives the AI agent web access capabilities:

| Capability               | Description                                           |
| ------------------------ | ----------------------------------------------------- |
| **Web research**         | Search the web for current information and trends     |
| **URL scraping**         | Extract content from specific web pages for reference |
| **Competitive analysis** | Research competitor content and strategies            |
| **Fact verification**    | Verify claims against current web sources             |

When Firecrawl is configured, the following tools become available to the AI agent:

| Tool         | Description                                       |
| ------------ | ------------------------------------------------- |
| `scrape_url` | Scrapes a URL and returns its content as markdown |
| `search_web` | Searches the web and returns relevant URLs        |

## Using OpenRouter

[OpenRouter](https://openrouter.ai) is a unified API gateway that gives you access to hundreds of AI models (Google Gemini, Meta Llama, Mistral, DeepSeek, and more) through a single OpenAI-compatible endpoint.

Since Notifuse's OpenAI integration uses the standard OpenAI SDK, you can point it to OpenRouter by setting the **Host** field:

### Form Fields for OpenRouter

| Field       | Description                       | Value                          |
| ----------- | --------------------------------- | ------------------------------ |
| **API Key** | Your OpenRouter API key           | `sk-or-v1-...`                 |
| **Model**   | Any model available on OpenRouter | `google/gemini-2.5-pro`        |
| **Host**    | OpenRouter API base URL           | `https://openrouter.ai/api/v1` |

This allows you to use any model supported by OpenRouter — including Google Gemini, Meta Llama, Mistral, DeepSeek, Qwen, and many others — directly from Notifuse's AI features.

<Tip>
  Browse available models at [openrouter.ai/models](https://openrouter.ai/models) to find the best fit for your use case and budget.
</Tip>

<Warning>
  The AI agent generates structured MJML email templates and full blog posts with HTML formatting. Only models with strong coding capabilities (e.g. GPT-4.1, Claude Sonnet, Gemini Pro) are smart enough to produce correct output. Smaller or weaker models may generate broken templates or malformed content.
</Warning>

## Prerequisites

Before configuring OpenAI:

1. **OpenAI Account**: Create an account at [platform.openai.com](https://platform.openai.com)
2. **API Key**: Generate an API key from the OpenAI dashboard
3. **Credits**: Ensure your account has sufficient API credits

## Usage Notes

<Note>
  API calls to GPT models count toward your OpenAI account usage. Monitor your usage in the OpenAI dashboard to manage costs.
</Note>

<Tip>
  For most use cases, **GPT-4.1 mini** offers the best balance of capability and cost. Use **GPT-4.1** for complex creative tasks and **GPT-4.1 nano** for simple, high-volume operations.
</Tip>
