> For the complete documentation index, see [llms.txt](https://missiveapp.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://missiveapp.com/docs/ai/setup/openai.md).

# OpenAI

Connect your OpenAI account to use GPT models in Missive.

Connect your OpenAI account to use GPT models for the assistant, prompts, and AI rules.

{% hint style="warning" %}
Missive requires an **OpenAI API key**, not a ChatGPT subscription. These are separate services with separate billing. Get your API key at [platform.openai.com](https://platform.openai.com/).
{% endhint %}

## Setup

{% stepper %}
{% step %}
**Get your OpenAI API key**

Create an [OpenAI account](https://platform.openai.com/signup) if you don't have one.

Go to [OpenAI Platform](https://platform.openai.com/) and navigate to **Settings** > **API Keys**.

Click **Create new secret key** and copy it somewhere safe. You won't be able to see it again.

(Optional) Find your **Organization ID** in **Settings** > **General**. You'll need this if your OpenAI account belongs to multiple organizations.
{% endstep %}

{% step %}
**Add the integration in Missive**

In Missive, go to **Settings** > **Integrations** > click **Add integration** > search for **OpenAI** and click **Add to Missive**.

Enter your **API key** (required).

Under **Advanced settings** (optional):

* **Organization ID** — only needed if your OpenAI account belongs to multiple organizations
* **API Base URL** — use `https://eu.api.openai.com/v1` for EU data residency; leave blank for the default US endpoint

Click **Add**.
{% endstep %}

{% step %}
**Share with your team (optional)**

To let your team use AI features or create AI rules, share the integration:

Go to **Settings** > **Integrations** > **OpenAI** and click **Share integration** at the top.

{% hint style="warning" %}
Shared integrations mean everyone uses the same OpenAI API key. All usage bills to your OpenAI account.
{% endhint %}
{% endstep %}

{% step %}
**Restrict available models (optional)**

By default, all models are available to your team. To limit which models they can choose in the Assistant:

Go to **Settings** > **Integrations** > **OpenAI** and scroll to **Models**.

Select the models you want to make available. Choosing **All models** automatically includes any future models. Deselecting specific models prevents your team from using them.
{% endstep %}
{% endstepper %}

## Available models <a href="#available-models" id="available-models"></a>

Missive supports every current OpenAI GPT model that can call tools. New models appear automatically as OpenAI releases them.

### Assistant models

| Model         | Best for                                              | Speed    | Quality |
| ------------- | ----------------------------------------------------- | -------- | ------- |
| GPT-6 Sol     | Complex reasoning, nuanced writing, detailed analysis | Moderate | Highest |
| GPT-5.6 Terra | Most daily tasks, good balance of speed and quality   | Fast     | High    |
| GPT-6 Luna    | Quick tasks, lowest cost                              | Fastest  | Good    |

For drafting customer-facing email replies, GPT-6 Sol gives the best results. GPT-5.6 Terra is the default model and a good all-rounder. GPT-6 Luna is great for quick tasks like grammar fixes or summaries.

Older models are still available under **Legacy** in the model picker.

### Rule models

AI actions in rules can use any of the models above, plus **GPT-5 (with web search)**, a rule-only model with real-time web search. **Fast (synchronous)** models run inline, so the labels they apply can trigger other rules. **Prompt** conditions only support Fast models. See [AI Rules](/docs/advanced-features/rules/ai-rules.md#model-selection) for details.

| Model                                                          | Type                                                                          |
| -------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| GPT-5.4 Mini, GPT-5 Mini, GPT-4o Mini, GPT-5 (with web search) | Fast. Use in Prompt conditions or chained rules                               |
| All other models                                               | Powerful (asynchronous). Better results, but labels won't trigger other rules |

For high-volume AI actions that don't need to chain, GPT-6 Luna is the lowest-cost option.

## Data privacy

OpenAI does **not** use API data to train models unless you explicitly opt in. Prompts and responses are retained for up to 30 days for abuse monitoring, then deleted.

To confirm data sharing is off, go to [platform.openai.com](https://platform.openai.com/) > **Settings** > [**Data controls**](https://platform.openai.com/settings/organization/data-controls/sharing) > **Sharing** and verify all three options are **Disabled**:

* **Enable sharing of model feedback from the Platform**
* **Share evaluation and fine-tuning data with OpenAI**
* **Share inputs and outputs with OpenAI**

OpenAI also offers data residency options for organizations that need data to stay in a specific region. To use EU data residency with Missive, set the **API Base URL** to `https://eu.api.openai.com/v1` in **Advanced settings**. See our [AI FAQ](/docs/ai/using-ai/faq.md#openai) and [OpenAI's data controls documentation](https://developers.openai.com/api/docs/guides/your-data) for details.

## Cost and usage

OpenAI bills based on tokens processed (input and output). A token is roughly 3/4 of a word. Check [OpenAI's pricing page](https://openai.com/api/pricing/) for current rates.

Each request includes the conversation, your instructions, and the assistant's tool definitions, so reading a thread and drafting a reply typically uses 10,000 to 30,000 tokens. With GPT-5.6 Terra, that's usually a few cents per request.

{% hint style="info" %}
Set a [monthly budget limit](https://platform.openai.com/settings/organization/limits) in OpenAI to prevent unexpected charges.
{% endhint %}

### Managing costs

* **Use the best model for manual tasks.** When you trigger AI yourself (drafting a reply, asking the assistant a question), the cost per interaction is negligible. Use GPT-6 Sol for the best results.
* **Use cheaper models for AI rules.** Rules run automatically on every matching message, so costs add up. GPT-6 Luna or a **Fast** model like GPT-5.4 Mini is a better choice for classification and routing.
* **Add conditions to AI rules.** Limit when rules run (e.g., only unassigned conversations, only specific labels) to avoid processing every email.
* **Monitor usage.** Check your [OpenAI dashboard](https://platform.openai.com/usage) regularly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://missiveapp.com/docs/ai/setup/openai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
