# Add AI to your app (AirRouter)

> Turn on AirRouter, see what your app's AI calls cost, top up the AirRouter Balance, set a daily limit, and answer the AirRouter Billing card.

Source: https://air.build/docs/services/add-ai-to-your-app/

AirRouter lets your app use AI: text models, and pictures, voices, music and clips, called from your app's server through one endpoint. Each call is paid from the Team owner's **AirRouter Balance**, and the **AirRouter** tab shows what every call cost and who in your app made it.

AirRouter pays for the AI inside the app you're building. Your own AirBuild plan and usage are separate; see Settings › [Plan & Usage](https://air.build/docs/settings/plan-usage/).

## Open the AirRouter tab

**iPhone**

Open the Project's chat and tap the tabs button (four squares) in the top-right corner. In the list under the tab cards, tap **AirRouter**.

**Mac**

Open the Project's chat and choose **View › Go To › AirRouter**. You can also open the inspector (**View › Show Inspector**, ⌥⌘I), click **New Tab** (**+**) and click **AirRouter**.

## Turn AirRouter on

AirRouter starts off in every Project. Anyone in the Team can turn it on.

1. In the **AirRouter** tab, tap **Turn On AirRouter**. If an Agent sent a card asking for it, you can also tap **Turn On AirRouter…** on the card and then **Turn On AirRouter** in the sheet.
2. AirRouter turns on for the Project. From the tab, a request also goes to your Agents ("Add AirRouter to the app") so they put AI calls into the app.
3. Until the app makes its first call, the tab says **AirRouter Is On**, with the balance below it.

## Who pays, and who can do what

The Team owner pays for AI in all of the Team's apps from their own AirRouter Balance.

|  | Team owner | Member |
| --- | --- | --- |
| See the balance and every call | Yes | Yes |
| Set the daily limit | Yes | Yes |
| Turn AirRouter on or off | Yes | Yes |
| **Add Funds** and **Manage Billing** | Yes | No |

A member's balance card says "Paid by the Team owner", how much was spent today, and **AI Is Available** or **AI Is Paused**.

## Add funds

> [!NOTE]
> **Add Funds** is in the TestFlight and direct-download builds of AirBuild. The App Store build has **Manage Billing** only, which opens the billing page in your browser, where you can top up.

1. In the **AirRouter** tab, on the balance card, tap **Add Funds**.
2. Choose **$10**, **$25**, **$50** or **$100**, or type an **Amount**. It has to be whole dollars, from $5 to $500.
3. Tap **Continue to Payment**. Payment opens in your browser.
4. Pay. Your balance updates once the payment goes through. The tab reads the balance again when you come back to AirBuild.

**Manage Billing** opens the billing page in your browser, already signed in, for everything else about paying for AirRouter.

## Set a daily limit

The daily limit caps what your app can spend on AI in one day. Anyone in the Team can set it.

1. On the balance card, tap **Daily Limit**.
2. Turn on **Limit Daily Spending** and type the amount for **Each Day**. The sheet shows how much was spent today.
3. Tap **Save**.

To remove the limit, turn off **Limit Daily Spending** and tap **Save**.

With a limit, the card shows today's spending against it, for example "$1.20 spent today, daily limit $10", with a bar. When the limit is reached, AI in the app stops until the next day. The owner's card says: "AI is paused until tomorrow. Today's limit is reached."

## When AI is paused

AI in your app stops when the balance is empty or today's limit is reached. The owner's card says why:

| Message | What to do |
| --- | --- |
| "AI is paused until tomorrow. Today's limit is reached." | Wait for the next day, or raise the **Daily Limit**. |
| "AI in this app is paused. Top up to turn it back on." | Add funds. |

A member sees **AI Is Paused** and can ask the owner to top up.

## The AirRouter Billing card

An Agent can send an **AirRouter Billing** card in the chat when the app needs funds: "Top up so AI in your app keeps working."

| Who taps it | What opens |
| --- | --- |
| Team owner | **Add Funds** (on the App Store build, **Manage Billing**, which opens the billing page in your browser). |
| Member | The **AirRouter** tab, which shows whether AI is working. |

The card has no answer. Topping up doesn't tell the Agent; tell them in the chat if they're waiting.

## Read the dashboard

Once your app makes calls, the tab shows:

- **Today**, **30 Days**, **Users** (in the last 30 days) and **Failed** (failed calls aren't charged).
- **Spend (Last 30 Days)**: a chart of daily spending.
- **Recent Calls**: each call with its cost. Tap one for **Call Details**: **Status**, **Cost**, **Time**, **Duration**, **Provider**, **Endpoint**, **Model**, **Service**, **User** and **Request ID**, and a **Reason** when it failed.
- **Top Spending Users**: the people in your app who spent the most, with their calls. When there are five or more, **All Users** lists everyone, with a search. Tap a person to see their calls and spend over 30 days. When the person is one of the app's signed-in users (see **App Users** in [Host your app's backend, database and sign-in (AirHost)](https://air.build/docs/services/host-a-backend/)), their name is shown.
- **By Provider**: spending split by the AI service that answered.

A call's status is one of **Settling**, **Succeeded**, **Failed**, **Cancelled**, **Expired** or **Not Charged**. A failed call shows why:

| Reason | What it means |
| --- | --- |
| **AirRouter Balance is empty** | Add funds. |
| **Daily limit reached** | Wait for tomorrow or raise the limit. |
| **AI isn't paid for yet** | Paying for AirRouter isn't set up, or was closed. The owner can check in **Manage Billing**. |
| **AirBuild didn't send the call** | AirRouter refused the call before sending it on. |
| **Provider returned _code_** | The AI service answered with an error. |

## Turn AirRouter off

At the bottom of the tab, tap **Turn Off** and confirm **Turn Off AirRouter?**: "AI in your app stops working until AirRouter is turned back on."

## Questions

**Does Turn On cost anything?**

No. You pay only for the calls your app makes.

**Why can't I see Add Funds?**

Only the Team owner can add funds, and the App Store build doesn't have **Add Funds** at all; it has **Manage Billing**.

**I paid but the balance didn't change**

The balance updates once the payment goes through. Come back to AirBuild, or on iPhone pull down on the tab to read it again.

**Can my Agents test AI calls?**

Yes. They use `workers ai`, and a test call is a real, paid call. See [workers](https://air.build/docs/cli/workers/).
