> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aosplane.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aosplane.io/_mcp/server.

# Connect an AI account

Every session runs a coding agent, such as Claude Code or Codex, on an **AI account**: your subscription or key with an AI provider, which bills you for the model. You connect accounts in **Settings › AI connections**.

> **Note**
>
> Owners, Admins and Engineers can connect accounts for themselves. Only the **Owner** can connect **Team** accounts, which run everyone's sessions in the projects they're added to. Admins can see team accounts and change the team's order.

Your own accounts (tagged **Only you**) run only your sessions and are tried first. Then sessions use the team's order for that agent, moving to the next account when one runs out.

## Set up a coding agent

#### Start

In **Settings › AI connections**, choose **Set up an agent**.

#### Choose the agent

Pick **Claude Code**, **Codex**, **Tower**, **Cursor**, **Kiro** or **Antigravity**.

#### Choose how it gets access

Pick an account type. Only the types this agent can run on are listed.

#### Choose who it runs for

The Owner picks **Every project**, **Chosen projects** or **Only me**. Everyone else's accounts are theirs alone. Then pick the account's place in the agent's order.

#### Add the details and connect

Enter a **Name**, the key and any other fields shown, then choose **Connect and set up** followed by the agent's name.

![Set up an agent dialog on the step How does Claude Code get access?, listing Claude, Claude setup token and API and cloud account types, each tagged Only you or Team or you](/_fern-files/_img/72f3ecc2b1a5726f3d7d601e6002ef66d4bc742b90207999b8f34b05fc59aabc.webp)

#### Which account types each agent runs on

| Agent           | Account types                                                                                                                                                                                    |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Claude Code** | **Claude** (subscription), **Claude · setup token**, **Anthropic · API key**, Amazon Bedrock (AWS role or bearer token), Claude Platform on AWS (role or API key), **Custom provider · API key** |
| **Codex**       | **ChatGPT** (subscription), **OpenAI · API key**, **Azure OpenAI · API key**, **Amazon Bedrock · bearer token**, **Custom provider · API key**                                                   |
| **Tower**       | Picks a Claude or OpenAI model for each step. Runs on any Claude, ChatGPT, Anthropic, OpenAI, Amazon Bedrock, Claude Platform on AWS or custom provider account.                                 |
| **Cursor**      | **Cursor · API key** (one person's seat)                                                                                                                                                         |
| **Kiro**        | **Kiro · API key** (one person's seat), **Custom provider · API key**                                                                                                                            |
| **Antigravity** | **Google · Gemini API key**, **Google Cloud · service account**                                                                                                                                  |

## Connect your Claude subscription

Use a Claude plan you already pay for. A subscription only ever runs your own sessions.

#### Sign in with Claude

1. In **Set up an agent**, choose **Claude Code**, then **Claude**, then **Continue with Claude**.
2. Approve access in the Claude tab that opens. (No tab? Choose **Continue with Claude** in the dialog.)
3. Paste the whole code Claude shows, including the part after `#`, into **Authorization code** and choose **Send code**.

When the dialog says **Account connected**, you're done. A sign-in is valid for 15 minutes.

#### Paste a setup token

1. In a terminal, run `claude setup-token`, sign in, and copy the token it prints.
2. In **Set up an agent**, choose **Claude Code**, then **Claude · setup token**.
3. Paste it into **Setup token** and choose **Connect and set up Claude Code**.

The token lasts a year and only makes model requests. Renew it with **Paste a new token** in the account's menu.

![Who does it run for? step for a Claude setup token, with Only me shown in the steps and the Name, Plan (optional) and Setup token fields](/_fern-files/_img/de9b8edbf14bf6ccd21bede671023a103ee9d38eaa640ec43c1d875aba578a85.webp)

For a **ChatGPT** subscription, pick **ChatGPT**, choose **Continue with OpenAI**, and enter the **Verification code** shown on the OpenAI page.

## Fix an account

The **AI accounts** tab lists every account, whose sessions it serves, the agents that use it and its status.

![AI accounts tab listing accounts with the Account, Kind, Serves, Agents and Status columns](/_fern-files/_img/64faf3ada199e9679103c0588226d66e86c679bf98cc45018c35b36816347a98.webp)

An account that shows **Setup pending**, **Sign-in needed** or **Needs attention** can't start sessions: choose **Sign in again** or **Replace key** on its row. **Expires soon** means the known expiry you entered is less than 30 days away. A **Disconnected** account comes back with **Reconnect** in its **⋯** menu.

## Good to know

* **Disconnect** signs an account out but keeps its place in orders and projects. **Delete** can't be undone.
* Keys are stored securely and never shown again.
* **Every project** adds a team account to today's projects. Add it to new ones from their settings.
* On the **Coding agents** tab, Admins choose **Edit order** to change the team's order.

## Related

* [Choose AI accounts for a project](/project-ai-accounts)
* [Start a session](/start-a-session)
* [Create and configure an agent](/agents)