# AI model

An AI model from OpenAI decides every step of the MAVEN agent. You pay for the model separately from your Atlan plan: through your own OpenAI API key or within your ChatGPT plan. An API key is a code from your OpenAI account that lets Atlan use the model at your cost.

Section: The MAVEN agent · HTML version: https://atlanbot.com/docs/ai-model/

## API key or ChatGPT account

You choose the access, that is how the agent reaches the model, in **MAVEN** › **Model access**. **API key** is the default.

|  | API key | ChatGPT account |
| --- | --- | --- |
| You pay | For the tokens used, from your OpenAI account's balance. Tokens are the small pieces of text the model reads and writes; the price depends on how many. | Within your ChatGPT plan, with no price per token. Usage counts toward the plan's limit. |
| Models | Every model on the list. | The ones OpenAI gives your plan. |
| You need | A key from an OpenAI account topped up with at least $5 in total. | A ChatGPT account. You sign in in your browser. |
| Limit | The most AI may cost in one run, the agent's work on a phone from start to stop. It is shown next to each model. | Your ChatGPT plan's limit. |
| AI comments and messages | Are written on this key too. | Are written through this account too. |

## Choosing the model

The model list is in **MAVEN** › **Agent model**. Click a model to choose it. Your choice stays even after Atlan restarts.

![The MAVEN page: the Agent model panel with OpenAI's four models, each with its per-run limit, and Luna chosen, with AI usage for 7 days below it.](https://atlanbot.com/static/docs/docs-models-en.webp?v=4ca2d6d6ae)

*MAVEN: Agent model and AI usage. Sample data.*

| Model | Per-run limit (API key) | Lock tag |
| --- | --- | --- |
| GPT-6 Luna **Recommended** | $0.50 | ChatGPT account or API key |
| GPT-6.1 Terra | $5 | Paid ChatGPT plan or API key |
| GPT-6.2 Sol | $10 | Plus plan or higher, or API key |
| GPT-6.2 Astra | $40 | Plus plan or higher, or API key |

- Luna is recommended and chosen by default.
- A model you cannot use with your access is dimmed. It carries a lock with what it needs. It cannot be chosen: clicking it takes you to **Model access**.
- With a ChatGPT account, OpenAI decides which models your plan gets. Atlan reads that list from your account.
- When your ChatGPT plan does not include the chosen model, it stays chosen with **Requires a paid ChatGPT plan**, and the agent does not start on it.
- The panel's header shows what the agent works through, for example **OpenAI API key** or **ChatGPT, paid plan**.

The model does not change how the agent works: on every model it works the same way and by the same rules. A more expensive model has a higher cost limit per run.

> **The agent never switches model by itself** The agent uses only the chosen model and the chosen access. When either stops working, the agent does not start or stops the task. It never switches to another model by itself. Nor does it move by itself from the ChatGPT account to the API key, or the other way round. Changing the access keeps the chosen model.

The list holds OpenAI models. The **Claude and Codex** section on the same page connects the Claude and Codex assistants to Atlan. It does not change the agent's model: [Connect Claude or Codex](https://atlanbot.com/docs/assistants.md?lang=en).

## OpenAI API key

1. **Create a key at OpenAI** Create a key at [platform.openai.com/api-keys](https://platform.openai.com/api-keys). Your OpenAI account must be topped up with at least $5 in total. Otherwise OpenAI gives no access to the agent's model.
2. **Open **MAVEN** › **Model access**** Choose **API key**.
3. **Save the key** Paste it into **OpenAI key** and click **Save key**. The state changes to **Saved**.

- Atlan keeps the key in Windows Credential Manager, Windows' safe store for passwords. Once saved, Atlan never shows the whole key again, only `sk-••••••••••••`.
- **Change** replaces the key with a new one. **Remove** deletes it from Credential Manager. The models that use it then stop working.
- The key serves the **MAVEN agent**, **AI comments** and **AI direct messages**. Without a key, the **Waiting for this key:** line lists what waits for it.
- Before a start, Atlan checks the key and the access to the model. If something is wrong, nothing starts on the phone.
- Without a key, the phone and module pages show **Add an API key to run automations** with a **Go to MAVEN** button. The rest of the app works as usual.

On first run, Atlan asks for the key and checks it with OpenAI before saving it. The check costs nothing. You can skip this step and add the key later: [First run](https://atlanbot.com/docs/first-run.md?lang=en).

## ChatGPT account

1. **Open **MAVEN** › **Model access**** Choose **ChatGPT account**.
2. **Click **Sign in with browser**** ChatGPT's sign-in opens in your browser.
3. **Sign in in your browser** You have 10 minutes for it. Once you are signed in, the state changes to **Signed in** and the account's email appears next to it.

- The ChatGPT account works through Codex, OpenAI's official app that comes with Atlan. Codex keeps your sign-in. Atlan never sees your password.
- **Sign out** signs you out of ChatGPT. The chosen access does not change. So the agent does not start until you sign in again or choose the API key.
- On first run you can add only an API key. You connect a ChatGPT account here.
- Atlan does not show how much of the plan's limit is left. When the limit runs out, the state changes to **Plan limit reached**. Below it you see when the limit renews, if OpenAI gives that. Until then the agent does not start on this account.

## Limits and usage

On the API key, each model has a cost limit for one run. It is shown under the model's name, for example **Limit $0.50 per run**. When a run uses it up, Atlan stops the task and says that the AI usage limit was used up. The next run has a limit of its own. Atlan does not cap your total spending. The limits set on your OpenAI account apply.

The **MAVEN** › **AI usage** section shows AI usage for **Today**, **7 days** or **30 days**. A tag next to the title names the access it covers.

| Access | What it shows |
| --- | --- |
| OpenAI API key | **Input tokens**, **From cache**, **Output tokens** and **Cost** with the average per phone a day and the cache savings (text the model has already read costs less). The chart shows cost per day. |
| ChatGPT plan | The same tokens and **Model calls** instead of cost, since a ChatGPT plan has no price per token. OpenAI counts the limit in your plan. The chart shows tokens per day. |

You can split usage by **Phones**, **Modules**, **Runs** and **Days**. The cost in Atlan is an estimate from OpenAI's prices. Your real bill is on your OpenAI account's usage page.

## When the model does not work

With each of these problems, the agent does not start on the phone or stops the current task.

| The message says… | What to do |
| --- | --- |
| no OpenAI API key is stored | Add a key in **MAVEN** › **Model access**. |
| OpenAI did not accept the key | Copy the key from OpenAI again, all of it, and save it again. |
| your OpenAI account has no access to the model chosen for the agent | Top up the OpenAI account with at least $5 in total. You can also check, on the OpenAI platform, the restrictions of the project the key belongs to, or choose another model. |
| your OpenAI account has no credit left or reached its spending limit | Top up the balance or raise the spending limit on the OpenAI platform. |
| the queue stopped because OpenAI refused the key, the model or the credit | Fix the cause as in the rows above and start the phone again. |
| the AI usage limit was used up | The run used up the chosen model's cost limit. The next run has a limit of its own. |
| the agent is set to work on a ChatGPT account, but you are not signed in | Sign in in **MAVEN** › **Model access**. |
| your ChatGPT plan's limit is used up (state **Plan limit reached**) | Wait for the limit to renew, or switch the access to **API key** in **MAVEN** › **Model access**. |
| your ChatGPT plan does not include the chosen model | Choose another model, switch the access to the API key or change your ChatGPT plan. |
| Codex is missing from the Atlan folder or its file is damaged | Check that your antivirus did not remove it, then reinstall Atlan. |
| the sign-in in your browser was not finished within 10 minutes | Click **Sign in with browser** again. |
| Codex did not answer | Try again in a moment. |

Other messages and their codes are covered in [the errors article](https://atlanbot.com/docs/errors.md?lang=en).
