# Custom Keys

> The Default Model every Agent runs on, and every AI provider you can connect: subscriptions, Magpie and your own endpoint, with each field, state and error.

Source: https://air.build/docs/settings/custom-keys/

Custom Keys sets the model your Agents run on and connects AI accounts you already have, so Agents can run on them. Its one-line description in the app: "Configure your own AI model provider credentials for workspace agents." For a walkthrough, see [Use your own AI key or subscription](https://air.build/docs/team/use-your-own-ai-key/).

## Open Custom Keys

**iPhone**

Open **Settings**. Under **Connections**, tap **Custom Keys**. The row shows the short name of your Default Model.

**Mac**

Open **Settings** and click **Custom Keys** in the sidebar.

Searching Settings for **Default Model**, **Providers** or **Custom Endpoint** also opens it. The page reads every login again each time it opens.

## Default Model

The model every Agent runs on unless you picked a model for that Agent. Every choice here applies at once; there's no Save. Agents without a model of their own switch after their current step.

| Row | What it does |
| --- | --- |
| **Model** | Opens the model list. **Platform Default** (the top row) follows AirBuild's own default. The list also has the models of every provider you connected, Magpie's models and your Custom Endpoint. A provider whose login stopped working shows with a way to sign in again. |
| **Thinking Effort** | Shown when the model has levels: some of **Off**, **Minimal**, **Low**, **Medium**, **High**, **Extra High**, **Max**, lowest first. |
| **Speed** | Shown when the model offers a faster speed. One faster speed is a switch (**Fast**); more is a menu: **Standard**, **Fast**, **Ultrafast**. |
| **_N_ Context**, for example **1M Context** | Shown when the model can use a larger context window than the default. Off (the default) keeps the default window; on uses the model's own. |
| **Always Show Usage** | Keeps the usage capsule above the message box in chats, even below 80%. Off by default. Saved on this device only. |

If the settings can't be read, the section shows the reason and **Try Again**. If the model list can't be read, the **Model** row offers to retry.

### Switching models

| Prompt | When | Buttons |
| --- | --- | --- |
| **Switch Default Model?** — "Use _model_ as your default model? Agents without an individual model choice will switch after their current step." | Right after you connect a provider. | **Switch** makes it the Default Model; **Cancel** keeps yours. |
| **Use your AirBuild AI quota?** — "This model won't use the model account you connected. It uses your AirBuild AI quota instead." | You have a provider connected and pick one of AirBuild's own models. | **Use AirBuild Model** applies it; **Cancel** keeps the model you had. |

## Providers

A **Search Providers** field narrows the list; "No providers match your search." when nothing does. Once logins are read, connected providers stand under **Connected** and the rest under **More Providers**. Tap a row to open it.

| Provider | Description in the app | How it connects |
| --- | --- | --- |
| **Claude Pro or Max** | Use your Claude subscription. | Sign-in, or a Claude Code setup token |
| **ChatGPT Codex** | Use your ChatGPT plan's Codex access. | Sign-in |
| **GitHub Copilot** | Use your GitHub Copilot subscription. | Sign-in with a code to paste |
| **Cursor** | Use your Cursor plan. | Sign-in |
| **Grok** | Use your xAI Grok subscription. | Sign-in with a code to confirm |
| **Kimi For Coding** | Use your Kimi coding plan. | Sign-in with a code to confirm |
| **Kimi For Coding Global** | Use your Kimi coding plan. | Sign-in with a code to confirm |
| **Z.ai** | Use your Z.ai Coding Plan. | Sign-in |
| **BigModel** | Use your GLM Coding Plan from bigmodel.cn (Zhipu). | Sign-in |
| **Kiro** | Use your Kiro plan. | Sign-in |
| **Qoder** | Use your Qoder plan. | Sign-in |
| **Qoder CN** | Use your Qoder plan from qoder.cn. | Sign-in |
| **WorkBuddy** | Use your Tencent WorkBuddy plan. | Sign-in |
| **WorkBuddy AI** | Use your WorkBuddy plan from workbuddy.ai. | Sign-in |
| **Devin** | Use your Devin plan. | Sign-in |
| **Magpie** | A model from your Magpie gateway, on your Mac or online. | A form. See [Magpie](https://air.build/docs/settings/custom-keys/#magpie). |
| **Custom Endpoint** | Any server that speaks the OpenAI or Anthropic API. | A form. See [Custom Endpoint](https://air.build/docs/settings/custom-keys/#custom-endpoint). |

A row with the description "A login stored by another version of AirBuild." is a login this version doesn't know. You can still open it and remove it.

The page's footer: "Usage is billed directly by each provider. Credentials are authenticated securely and stored in your workspace; passwords are never sent to AirBuild."

### A row's state

| State | Meaning |
| --- | --- |
| **Not Connected** | Nothing is set up. |
| **Signing in** | A sign-in is under way. |
| **Connected** | The login works. |
| **Connected (API Key)** | Connected with a key that doesn't expire, for example after signing in to Z.ai or BigModel. |
| **Sign in Again** | The provider stopped accepting the login. Open it and tap **Sign In Again**. |

A subscription that reports usage shows how much of its windows is left on the row as well. Custom Endpoint's row shows its model and server; Magpie's row shows how it answers (see [Magpie's state](https://air.build/docs/settings/custom-keys/#magpies-state)).

## A provider's page

| Part | What it shows or does |
| --- | --- |
| **Sign In with _provider_** | Starts the sign-in. Before you've signed in, it's a row under the provider's name on iPhone and iPad, and a button under that card on Mac. Once there's a login, it reads **Sign In Again** and is a row of the **Connection** card. Footer: "AirBuild opens the provider's sign-in page. The login is stored in your workspace, not on this device." |
| **Paste Setup Token…** | Claude Pro or Max only. A row under the sign-in: under the provider's name before you've signed in (on Mac, a button of the same width under the card), then under **Sign In Again** in the **Connection** card. See [Claude setup token](https://air.build/docs/settings/custom-keys/#claude-setup-token). |
| **Connection** | **Authentication**: **Subscription**, **Claude Code Token** or **API Key**. **Status**, when the login stopped working: "This login is no longer accepted. Sign in again." **Expires**: the date the login ends, for a setup token. **Kept Signed In**: "Last renewed _time_", or **Managed by your workspace**. |
| **Subscription Usage** | For subscriptions that report it: each window the provider reports, "_x_ left" and "Resets _time_", and when it was last checked. To check again, pull down on iPhone and iPad, or click **Refresh** on Mac. **No data available yet** until the provider reports anything. |
| **Remove This Login** | A row in a card of its own at the very bottom of the page, once there's a login. See [Remove a login](https://air.build/docs/settings/custom-keys/#remove-a-login). |
| **Done** | Closes the page. |

On the Mac, Esc presses **Done**.

### Signing in

**iPhone**

The provider's sign-in page opens inside the app.

**Mac**

The provider's sign-in page opens in your web browser.

While it waits, the page shows **Waiting for browser sign-in…**. For Kimi, Grok and GitHub Copilot it shows a code under **Confirm this code in your browser**; once the code is on your clipboard the line reads "Copied. Paste this code if the sign-in page asks for one." "If the browser did not open or you closed it, restart the sign-in or cancel to go back.": **Restart Sign-In** or **Cancel Sign-In**. On iPhone and iPad, **Restart Sign-In** is a row of the card and **Cancel** is at the top left.

### Claude setup token

1. On a computer with Claude Code, run `claude setup-token` and sign in.
2. Copy the token it prints.
3. In **Claude Pro or Max**, tap **Paste Setup Token…**, paste it under **Token** (or use the **Paste** button), and tap **Save**. On the Mac, Return presses **Save**.

The sheet says the token "lasts about a year and replaces your current Claude sign-in."

The page then says "Connected with a Claude Code setup token. Tokens are valid for about one year; paste a new one to renew." and shows the day it **Expires**.

### Remove a login

Tap **Remove This Login**, the row in the last card of the page. The app asks **Remove This Login?** — "Agents will no longer be able to use _provider_. Your account with the provider is not affected." Tap **Remove**. The page shows **Removing…** while it works.

## Magpie

Magpie is a separate app that serves AI models through a gateway. AirBuild can use the models of a Magpie you run, either on your Mac or at an address on the internet. The **Magpie Guide** button opens [Magpie's own guide](https://github.com/yetone/magpie#readme).

### Connection

| Field | Options and default | What it is |
| --- | --- | --- |
| **Connection** | **Mac Bridge** or **Direct**. A first setup starts on **Mac Bridge** on Mac and on **Direct** on iPhone and iPad. | Where Magpie is. |
| **Port** | Mac Bridge, on Mac. Default `3425`. | The port Magpie listens on, on this Mac. |
| **Mac** | Mac Bridge, on iPhone and iPad. Read only. | The Mac that links Magpie, once one is set up. |
| **URL** | Direct. Example `https://magpie.example.com`. | Magpie's address. |
| **Gateway Key** | Under **Authentication**. **Required** for a Mac Bridge set up on this Mac, **Optional** for Direct, **Saved, leave blank to keep** once saved. | A gateway key you made for AirBuild in Magpie. "It is stored in your workspace and never shown again." |

**Mac Bridge.** "AirBuild on this Mac links Magpie to your cloud workspaces over an encrypted connection. Keep this Mac awake with AirBuild open." A Mac Bridge can only be set up on the Mac that runs Magpie. Choosing it on iPhone or iPad before that shows the steps: install AirBuild on the Mac that runs Magpie and sign in with this account; on that Mac, open **Settings › Custom Keys › Magpie** and choose **Mac Bridge**; keep that Mac awake with AirBuild open. **Get AirBuild for Mac** opens AirBuild's download page. **Save** stays dimmed until it's set up there.

**Direct.** For a Magpie reachable over HTTPS. If the URL is a private network address, the form warns: "For security reasons, cloud workspaces can't reach private network addresses such as _host_. For a Magpie on your Mac, choose Mac Bridge."

### Set up Magpie

Until Magpie is saved, or while something's wrong, **Set Up Magpie** lists what to do in Magpie:

For **Mac Bridge**, on the Mac that runs Magpie:

1. In Magpie, open **Settings › Network and sharing** and turn on **Share on local network**.
2. Open **Gateway › Gateway keys** and add a key for AirBuild.
3. Paste the key into **Gateway Key**, then click **Save**.

For **Direct**, on any device:

1. Run Magpie where it can be reached over HTTPS.
2. Turn on **Share on local network** and add a gateway key for AirBuild.
3. Enter its **URL** and key here, then tap **Save**. On the Mac, Return presses **Save** too.

Once saved, Magpie's models appear in the **Model** list of the Default Model and of each Agent.

### Magpie's state

Magpie's row and page say whether it answers, checked every 30 seconds while Custom Keys is open:

| State | What to do |
| --- | --- |
| “_Mac_, _n_ ms” (Mac Bridge) or “_n_ ms” (Direct) | It answers. |
| **Can't reach Magpie** (on its page: "Can't reach Magpie. Is _Mac_ awake with AirBuild open?") | Wake the Mac and open AirBuild, or check the URL. |
| **Turn on sharing in Magpie** | Turn on **Share on local network** in Magpie. |
| **Magpie refused the key** | Make a new gateway key in Magpie and paste it. |

### Remove Magpie

Tap **Remove Magpie**: the trash at the bottom left on iPhone and iPad, the button at the bottom left on Mac. Confirm **Remove** in **Remove Magpie?**: "Agents set to a Magpie model will stop until they are given another model. The gateway key is deleted from your workspace."

## Custom Endpoint

For any server that speaks the OpenAI or Anthropic API. Tap **Save** when done. On the Mac, Return presses **Save**.

### Endpoint

| Field | Options and default | What it is |
| --- | --- | --- |
| **API** | **OpenAI Chat Completions**, **OpenAI Responses**, **Anthropic Messages** | The request format. |
| **Base URL** | Example `https://api.openai.com/v1` (OpenAI) or `https://api.anthropic.com` (Anthropic) | The server. The footer says "Requests go to _url_." |
| **Model ID** | Example `gpt-5.6-sol` | The model name the server expects. |
| **Name** | Optional | What the app calls this model. |

If the Base URL is a private network address: "For security reasons, cloud workspaces can't reach private network addresses such as _host_. Only local workspaces can use this endpoint."

### Authentication

| Field | Options and default | What it is |
| --- | --- | --- |
| **Method** | **Bearer Token** (default for OpenAI), **API Key Header** (default for Anthropic), **None** | **Bearer Token**: "Sent as a bearer token in the Authorization header." **API Key Header**: "Sent in the x-api-key header, the way Anthropic's own API takes it." |
| **API Key** | **Required**; **Saved, leave blank to keep** once saved | The footer: "The key is stored in your workspace and never shown again." |

### Model

| Field | Default | What it is |
| --- | --- | --- |
| **Reasoning** | Off | The model thinks before answering. |
| **Effort Levels** | Low, Medium, High | With Reasoning on: the levels to offer under Thinking Effort. |
| **Image Input** | Off | The model accepts images. |
| **Context Window** | 128000 | "The context window decides when a long conversation is compacted; set it to what the server allows." |
| **Max Output Tokens** | 16384 | The longest answer. |
| **Advanced Options** | Off | Shows the sections below. |

### Advanced Options

- **Headers**: **Add Header** adds a row with a name (for example `anthropic-beta`) and a value, sent with each request. Swipe a row (on Mac, the minus button) to remove it.
- **Compatibility**: switches for servers that differ from the official APIs. Each is **Auto** (the default), **On** or **Off**, or **Auto** and a named value.
  - OpenAI Chat Completions: **Max Tokens Field**, **Thinking Format**, **Store Completions**, **Developer Role**, **Reasoning Effort Field**, **Usage in Stream**, **Strict Tool Schemas**, **Tool Result Name**, **Assistant After Tool Result**, **Thinking as Text**, **Reasoning on Assistant Messages**, **Cache Markers**, **Z.ai Tool Stream**, **Session Affinity Headers**, **Session Affinity Format**, **Long Cache Retention**.
  - OpenAI Responses: **Session Affinity Headers**, **Session Affinity Format**, **Long Cache Retention**.
  - Anthropic Messages: **API Version** (example `2023-06-01`), **Eager Tool Input**, **Cache Markers on Tools**, **Temperature**, **Adaptive Thinking**, **Empty Signatures**, **Long Cache Retention**.
- **Extra Body Fields**: a JSON object added to each request, for example `{"store": false}`.
- **Pricing**: **Input**, **Output**, **Cache Read**, **Cache Write**. "US dollars per million tokens, for the cost shown under each turn. The provider bills you; AirBuild only counts."

### Remove the endpoint

Tap **Remove This Endpoint**: the trash at the bottom left on iPhone and iPad, the button at the bottom left on Mac. Confirm **Remove** in **Remove This Endpoint?**: "Agents set to this endpoint will stop until they are given another model. The key is deleted from your workspace."

## Messages

While the page reads your logins and Default Model, their rows show placeholders.

| What you see | What to do |
| --- | --- |
| The reason, at the top of the page | Your logins couldn't be read, or the last action on them (connect, save, remove) failed. Reopen Custom Keys, or try the action again. |
| The reason, in a sheet (Magpie, Custom Endpoint, Paste Setup Token, a provider's page) | Saving or removing there failed. Check the fields and try again. |
| **Enter the API key for this endpoint, or set Authentication to None.** | Custom Endpoint: the **Method** sends a key and none is saved or typed. Fill in **API Key**, or set **Method** to **None**. |
| **This login is no longer accepted. Sign in again.** / **Sign in Again** | Tap **Sign In Again**. |
| **Sign-in was cancelled.** | Start the sign-in again. |
| **The provider refused the sign-in. Try again.** | Sign in again with the account that has the plan. |
| **The provider response could not be read. Try again.** | Try again. |
| **Another sign-in process is still completing. Please wait a moment and try again.** | Wait, then **Restart Sign-In**. |
| **Unable to open browser to sign in.** | Check that a browser is available, then try again. |
| **Sign-in timed out. Try again.** | Start again and finish on the provider's page. |
| **This is not a JSON object.** | Make **Extra Body Fields** one JSON object. |

## Questions

**Who bills me?**

Each provider bills you directly. A model from a provider you connected doesn't use your AirBuild AI quota.

**Does Always Show Usage change other devices?**

No. It's saved on the device where you set it.

**Can a cloud Team use a Magpie or endpoint on my home network?**

Not by its private address. For Magpie, choose Mac Bridge. A Custom Endpoint at a private address works only for local Teams.
