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

# Connect your AI subscription

> Connect one of the 13 AI providers that your squad can run on, and add or replace accounts later in Settings > AI.

Your teammates run on your own AI accounts. You connect a subscription or an API key from one of 13 providers, and your provider bills you for model usage. Squad does not sell model usage. The credentials are stored on your squad's computer.

Squad recommends **Claude Code** on a Claude Max or Ultra plan, with Claude Opus 5.5. A squad that you set up with Claude Code starts on **Claude Code Opus 5.5**. See [Limits and defaults](https://squad.so/docs/limits-and-defaults.md#setup-and-account).

You connect your first provider during setup. After setup, you add, replace, and remove accounts in **Settings** > **AI**. You can connect more than one provider and more than one account per provider.

## Before you start

* An account with one of the providers below, on the plan or key type in the table.
* For **Claude Code** and **Claude** only: Node.js and a terminal on your own computer, to run the command that creates a setup token. You do not need Claude Code installed.
* For **ChatGPT** only: in ChatGPT, open **Settings** > **Security** and turn on **Enable device code authorization for Codex**.

## Providers and what they bill

The providers appear in this order on the setup page and in the **Add an account** menu on **Settings** > **AI**.

| Provider | How you connect | What it uses and bills |
| - | - | - |
| **Claude Code** | Setup token | Your Claude subscription, through the Claude Code CLI on your squad's computer. The setup page describes it as "Flat-rate · Your Claude plan" and marks it **Recommended**. The window says that it uses plan limits only and never bills extra usage. |
| **ChatGPT · Codex** | Device code | Your ChatGPT plan. The setup page describes it as "Flat-rate · Pro subscription". |
| **Grok** | OAuth | Your SuperGrok or X Premium subscription. No API key and no per-token billing. |
| **Z.ai** | API key | Your GLM Coding Plan. |
| **Kimi** | API key | Your kimi.com subscription. Usage draws from your plan's Kimi Code credits. |
| **MiniMax** | OAuth | Your MiniMax Coding Plan. |
| **Gemini** | API key | Your Google AI Studio account, which has a free tier. |
| **GitHub Copilot** | Device code | Your active Copilot subscription. It gives your whole squad the Claude, GPT, Gemini, Grok, and Kimi models in your Copilot plan. No API key and no per-token billing. |
| **OpenRouter** | API key | Your OpenRouter balance. |
| **Qwen Cloud** | API key | Your Qwen coding plan's included quota. |
| **Cloudflare Workers AI** | API token | Your Cloudflare account. It runs open models. |
| **OpenCode** | API key | Your OpenCode Zen account, pay per use. |
| **Claude** | CLI setup token | Deprecated. Your Claude account at Anthropic, billed as Extra Usage at API prices. The setup page and **AI** mark it **Deprecated** and point you to Claude Code. It still works if you use it. See the **Claude** tab in [Steps for each provider](#steps-for-each-provider). |

For the credits that Squad charges for research tools, see [What Squad costs and what uses credits](https://squad.so/docs/costs.md). Credits never pay for model usage.

## Connect during setup

On the setup page, you pick one card under **Choose your AI provider**, tick the Terms box, and click **Launch my squad**. When you connect depends on the card:

* **Claude Code**: the setup page selects it by default and says "You’ll connect Claude Code right after setup: run one command on your computer and paste the token it prints. Your squad then runs on your Claude plan’s included limits." On the success screen, click **Connect Claude Code →**.
* **Claude** and **Z.ai**: you paste the token or key on the setup page, before you click **Launch my squad**. For Claude, the page first says "This connection is deprecated." with **Use Claude Code instead**, which selects Claude Code. The Terms box and **Launch my squad** appear only after you paste a token.
* **ChatGPT · Codex** and **MiniMax**: the connection starts by itself on the success screen, after the build finishes.
* All other cards show "Connects after setup". On the success screen, click **Connect** followed by the provider name. The same window as in **Settings** > **AI** opens. Follow the steps for your provider below.

On the success screen, **Skip for now** and **Skip to Dashboard** let you continue without a connection. Your teammates cannot work until you connect an account in **Settings** > **AI**.

The provider that you pick at setup also sets your squad's default model. See [Limits and defaults](https://squad.so/docs/limits-and-defaults.md#setup-and-account).

## Connect or add an account in Settings

**1. Open Settings > AI**

Click **Settings** at the bottom of the sidebar, then **AI**. You can also press ⌘K or Ctrl+K, type **AI**, and select **AI** (The AI your squad thinks with, and its accounts) under **Go to**.

**2. Choose the provider**

Click **Add an account**, beside **Accounts**. The menu lists every provider, in the order of the table above. **Claude** shows as **Claude (deprecated)**. Click the provider. The same menu adds a second account to a provider that already has one.

**3. Name the account**

In **Token name**, type a name for this account, for example `personal` or `work`. The part before the colon is fixed. Use a different name for each account of the same provider.

**4. Complete the provider steps**

Complete the steps for your provider in the next section.

A window titled **Add** followed by the provider's name and **token** opens. It closes when the account is connected. The account appears as a row on the provider's card under **Accounts**. A provider's card shows only after it has an account.

## Steps for each provider

> [tab] Claude Code
>
> 1. On your own computer, open a terminal and run `npx @anthropic-ai/claude-code setup-token`. The window shows this command under **1 · Generate a setup token**. You do not need Claude Code installed. The command needs Node.js.
> 2. Approve in the browser window that opens.
> 3. Copy the token that the terminal prints. It starts with `sk-ant-oat01-`. If the terminal wraps it onto two lines, copy all of it. Squad removes spaces and line breaks from the pasted token.
> 4. In the **Claude Code** window, paste the token in **2 · Paste the setup token**.
> 5. Optional: type the Claude account's email in **3 · Account email**. The token cannot show which account created it, so the email labels the row.
> 6. Click **Connect**.
>
> Squad checks the token with a real test turn on your squad's computer before it saves it. A regular Anthropic API key does not work here.
>
> The token goes through Squad's server on its way to your squad's computer, over encrypted connections. The server keeps no copy: the token is not saved in Squad's database or in its logs. It is stored only on your squad's computer, in Claude Code's own credentials file and in your squad's list of Claude Code accounts there. When you disconnect the account, Squad deletes its token from your squad's computer. See [How your Claude Code setup token travels](https://squad.so/docs/before-you-sign-up.md#how-your-claude-code-setup-token-travels).
>
> On Squad for Mac, the window shows the same command, and says "It needs only Node.js, not Claude Code."
>
> With more than one Claude Code account, one account is active and the others are on standby. The newest connection becomes the active one. When the active account reaches its usage limit, Squad makes the next account in the order active, and that account shows **In use**. The run that hit the limit continues once on the new account. If it had already done work, the teammate is told to continue from where it stopped and not to repeat what is done. The account that ran out is skipped until its limit resets. To choose the active account yourself, move it to the top of the card and save the order.

> [tab] ChatGPT
>
> 1. In ChatGPT, turn on **Enable device code authorization for Codex** in **Settings** > **Security**, if you did not do it before.
> 2. In the **ChatGPT · Codex** window, click **Connect OpenAI account**.
> 3. Under **1 · Copy this code**, copy the code.
> 4. Under **2 · Open this link and paste the code there**, open the link, paste the code, and approve.
>
> The window shows **Waiting for you to authorize…** until you approve. When you come back to the Squad tab, it shows **Confirming your sign-in…**. The code is valid for 5 minutes. The connection renews by itself. Only when a renewal fails does the account row say so: "It couldn’t renew itself. Reconnect it to sign in again."

> [tab] Grok
>
> 1. In the **Grok** window, click **Sign in with Grok**.
> 2. Copy the code, open the link, and approve on grok.com.
>
> Your squad refreshes the connection automatically. Grok cannot connect with a pasted key.

> [tab] Z.ai
>
> 1. Subscribe to the GLM Coding Plan at z.ai.
> 2. In **API Keys** on z.ai, open the **Personal Coding Plan** tab and add a key. A key from the **Standard** tab bills your Z.AI balance instead of your plan, so Z.AI refuses it even when your plan is active.
> 3. In the **Z.ai** window, paste the key in **API key** and click **Connect**.
>
> Squad checks the key with Z.AI before it saves it, also on the setup page. A key that Z.AI refuses is not saved, and the window says why. See [Troubleshooting](#troubleshooting). When Z.AI cannot be reached or answers in another way, for example with a rate limit, Squad saves the key without the check.

> [tab] Kimi
>
> 1. Open the Kimi Code Console with your kimi.com subscription and generate a key. The console allows up to 5 keys.
> 2. In the **Kimi** window, paste the key in **API key** and click **Connect**. Kimi subscription keys start with `sk-kimi-`.

> [tab] MiniMax
>
> 1. In the **MiniMax** window, click **Connect with MiniMax**. The MiniMax window has no **Token name** field.
> 2. Open the link that the window shows and approve access on MiniMax.

> [tab] Gemini
>
> 1. Create a key at aistudio.google.com/apikey (Google AI Studio).
> 2. In the **Gemini** window, paste the key in **API key** and click **Connect**. Keys can start with `AIza` or `AQ.`.
>
> Gemini connects only with an AI Studio API key. There is no Google sign-in. Squad checks the key before it saves it.

> [tab] GitHub Copilot
>
> 1. In the **GitHub Copilot** window, click **Sign in with GitHub**.
> 2. Copy the code, open the link, and enter the code on github.com.
>
> You need an active Copilot subscription. After you connect, the model lists show the models that your Copilot plan includes. Copilot cannot connect with a pasted token.
>
> Newer Copilot models, such as **Copilot Claude Opus 5.5**, show in the model lists only after your squad's computer has loaded them. That waits until no teammate is working. After you connect, **AI** checks again by itself for a while. See [Limits and defaults](https://squad.so/docs/limits-and-defaults.md#setup-and-account). If you connected Copilot before November 1, 2026, reconnect it to see them.

> [tab] OpenRouter
>
> 1. Create a key at openrouter.ai/keys.
> 2. In the **OpenRouter** window, paste the key in **API key** and click **Connect**. OpenRouter keys start with `sk-or-`.
>
> Squad checks the key before it saves it.

> [tab] Qwen Cloud
>
> 1. Create a key at home.qwencloud.com/api-keys with your Qwen coding plan.
> 2. In the **Qwen Cloud** window, paste the key in **API key**. Qwen Cloud keys start with `sk-`.
> 3. Optional: paste your plan's base URL in **Base URL**. The API keys page shows it next to the key. Leave it empty to use the default.
> 4. Click **Connect**.
>
> Squad checks the key with a real call. Extra keys must come from the same plan. When one key hits its limit, the next key takes over.

> [tab] Cloudflare Workers AI
>
> 1. Create an API token at dash.cloudflare.com/profile/api-tokens with the Workers AI permission.
> 2. Copy your Account ID. It is the 32-character ID on your Cloudflare dashboard's overview page.
> 3. In the **Cloudflare Workers AI** window, paste the token in **API token** and the ID in **Account ID**.
> 4. Click **Connect**.
>
> Squad checks the token against your account with a real call. Extra tokens in the same squad must use the same Account ID.

> [tab] OpenCode
>
> 1. Sign in at opencode.ai, open **API Keys**, and create a key.
> 2. In the **OpenCode** window, paste the key in **API key** and click **Connect**.

> [tab] Claude
>
> The **Claude** provider is deprecated. It connects your Claude account directly, not through the Claude Code CLI. Its card on **AI** shows **Deprecated** and "Claude Code replaces this connection. It uses the same Claude account and runs on your plan’s included limits, with no Extra Usage bill." The **Claude** window starts with "This connection is deprecated." and **Connect Claude Code instead**, which opens the Claude Code steps. Claude keeps working if you already use it. On Squad for Mac, Claude has no **Deprecated** label. Until a Claude Code account is connected, its card shows the same sentence, and the owner and Administrators get **Connect Claude Code**. The Mac's **Claude** window does not say that the connection is deprecated.
>
> 1. On your own computer, open a terminal and run `npx @anthropic-ai/claude-code setup-token`.
> 2. Approve in the browser window that opens.
> 3. Copy the token that the terminal prints. It starts with `sk-ant-oat01-`.
> 4. In the **Claude** window, paste the token in **2 · Paste the setup token** and click **Connect**.
>
> At setup, you paste this token on the setup page instead.
>
> How usage counts: Squad sends your teammates' requests directly to Anthropic with this token. The window says: "A direct connection is billed by Anthropic as Extra Usage at API prices." Check your usage at claude.ai/settings/usage. If you want your Claude subscription to stay within its plan limits, use **Claude Code** instead.

## Replace or remove an account

To reconnect an account, for example after it expired:

1. On the account's row, open the **…** menu (**Actions for this account**) and click **Replace…**. On a signed-out or expired account, you can also click **Reconnect** on the row.
2. Complete the steps for the provider. The window is titled **Replace** followed by the account name. The name is locked, so the new login overwrites exactly this account.

To remove an account, open the **…** menu on its row and click **Disconnect…**.

> [!WARNING]
>
> **Disconnect…** asks you to confirm: "Disconnect \[name]?" and "Teammates who use this account stop until you connect one again." If it was the only account for a provider, runs that use that provider's models fail until you connect an account again.

## Use more than one account

Each provider card can hold several accounts. With two or more accounts, the card numbers them, highest first, and your squad tries them in that order. Use the up and down arrows to change the order, then click **Save changes** in the **Priority order changed** bar. The order is the fallback order inside that provider. Claude Code is different: one account is active at a time, and the next account takes over when the active one reaches its usage limit. If every Claude Code account is at its limit, Claude Code cannot serve runs until one resets. Runs then move to the next model under **When it can’t answer**, if you set one. For how long an account is skipped, see [Limits and defaults](https://squad.so/docs/limits-and-defaults.md#runs).

Connecting an account does not change which model your teammates use. To run your teammates on a newly connected provider, choose one of its models in **Thinks with**, or add it with **Add one to try next…** under **When it can’t answer**, then save. See [Choose models and manage AI accounts](https://squad.so/docs/ai-accounts.md).

## Check that it works

* The account appears as a row on the provider's card. A healthy account shows no status word, except **In use** when the card has other accounts. A problem shows as a word such as **Expired** or **Signed out**. See [Statuses and what they mean](https://squad.so/docs/statuses.md).
* Send a message to your chief of staff in chat. A reply means your teammates can reach the model.

## Troubleshooting

**The window shows "Authorization timed out. Please try again."**
Cause: you did not approve the device code within 5 minutes.
Fix: close the window and start again. You get a new code.

**The ChatGPT connection does not complete after you paste the code.**
Cause: device code authorization can be off in your ChatGPT account. Squad asks you to turn it on before you connect.
Fix: in ChatGPT, open **Settings** > **Security** and turn on **Enable device code authorization for Codex**. Then connect again.

**The name field says the account "is already connected. Connecting would overwrite it."**
Cause: an account with the same token name exists on this card.
Fix: type another name, or select **Replace…** in the **…** menu of the existing account.

**Claude says "Token must start with sk-ant-oat01-".**
Cause: you pasted something other than a setup token, for example an API key or a partial token.
Fix: run the setup-token command again and copy the whole token.

**Claude Code refuses the token.**
Cause: Claude Code accepts only a setup token that starts with `sk-ant-oat01-`. It refuses API keys.
Fix: run `npx @anthropic-ai/claude-code setup-token` and paste its output.

**The Z.ai window says "Z.AI won’t use a GLM Coding Plan for this key."**
Cause: Z.AI answered "Insufficient balance or no resource package". Most often the key was made on the **Standard** tab of **API Keys**, which bills your Z.AI balance and never your plan. It can also mean that the account has no GLM Coding Plan, or a plan that Z.AI has not put in force.
Fix: make a key on the **Personal Coding Plan** tab and paste it. With no plan yet, subscribe to the GLM Coding Plan first. If a Personal Coding Plan key is refused too, contact Z.AI support.

**The Z.ai window says "Z.AI didn’t accept that key."**
Cause: Z.AI does not know the key, for example because it is incomplete, deleted, or expired.
Fix: copy the key again from **API Keys** on z.ai and paste it.

**A red banner says a provider "is signed out on your squad".**
Cause: the login for that provider stopped working. Runs that use it fail.
Fix: click **Reconnect** on the account and sign in again. On every other screen, a banner says "\[account] is signed out, so your squad can’t work.", with **Reconnect** for the owner and Administrators. For ChatGPT, the banner shows only when no ChatGPT account works. When Claude Code is signed out, **Today** and **Needs you** also say so first, with **Reconnect** and the account's name, and the owner gets one email. See [An expired AI connection](https://squad.so/docs/agent-stuck.md#an-expired-ai-connection).

**A ChatGPT row says "It couldn’t renew itself. Reconnect it to sign in again."**
Cause: the ChatGPT login can no longer renew itself.
Fix: select **Replace…** in the row's **…** menu and connect again.

**Chat shows "Your AI connection expired. Replies will fail until you reconnect."**
Cause: the account that serves your teammates expired.
Fix: click **Reconnect**, then click **Reconnect** on the account that shows **Expired** or **Signed out**, or select **Replace…** in its **…** menu if its row shows neither.

**You skipped the connection at setup and your teammates do not reply.**
Cause: no AI account is connected. **Settings** > **AI** says "No AI account is connected yet."
Fix: connect an account in **Settings** > **AI** with the steps on this page.

For other setup errors, see [Fix setup problems](https://squad.so/docs/setup-troubles.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.