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

# AI Settings

> Configure AI Chat, AI fields, AI automation, and App Builder for a self-hosted instance.

<Tip>Available for self-hosted Business plan and above</Tip>

Path: Admin Panel → AI Settings

The **AI Settings** page is used to configure **AI Chat**, **AI fields**, **AI automation**, and **App Builder**. The **Pending configuration** panel on the right shows which required items are still missing. Complete them in order.

## Before you start

Before you open the AI Settings page, make sure the following items are ready. Both **AI Chat Runtime** and **App Builder** rely on Vercel.

<Note>
  You only need one Vercel account to complete the setup.

  In the current version, some **AI** and **App Builder** capabilities are affected if the instance cannot access Vercel. Teable is working on full private deployment support for AI and App Builder, so future versions no longer depend on Vercel services.
</Note>

| Requirement                 | Required?             | Notes                                                                                    |
| --------------------------- | --------------------- | ---------------------------------------------------------------------------------------- |
| **Vercel account**          | Required              | You need a working Vercel account                                                        |
| **Vercel API Token**        | Required              | Used for **AI Chat Runtime**                                                             |
| **Team / Project**          | Required              | You need a usable Team and Project. If needed, you can create them in the page           |
| **AI Gateway API key**      | When using AI Gateway | Only needed if you choose **AI Gateway** as your model provider                          |
| **OpenAI Realtime API Key** | Optional              | Only needed if you want to enable **Voice input** in AI Chat                             |
| **Public access**           | Required              | Your **Teable instance** and **object storage (MinIO / S3)** must be publicly accessible |

Vercel-related costs usually have two parts:

| Item                       | Notes                                                                 |
| -------------------------- | --------------------------------------------------------------------- |
| **Vercel base cost**       | About **\$20/month** for App deployment and AI runtime infrastructure |
| **AI Gateway model usage** | Charged separately based on actual usage                              |

<Tip>
  Make sure your Vercel account has a credit card attached, that `Credit` status is healthy, and that auto top-up is enabled.
</Tip>

## Setup steps

Follow the **Pending configuration** panel in order. Turn the required items green first, then test the features. If a button is disabled or a feature still does not work, it usually means an earlier requirement has not been completed yet.

Follow these four steps:

<Steps>
  <Step title="Configure LLM API">
    Set up your model connection and complete the initial test.
  </Step>

  <Step title="Configure Recommended Models">
    Add a clear set of primary models for users to choose from.
  </Step>

  <Step title="Set chat model">
    Choose the default model for AI Chat.
  </Step>

  <Step title="Configure the runtime and App Builder">
    Complete the Vercel setup and confirm that public access is ready.
  </Step>
</Steps>

### Configure LLM API

Start by choosing how you want to connect your models in **LLM API**.

<Tabs>
  <Tab title="AI Gateway (Recommended)">
    Enter your **AI Gateway API key**, then click **Test**. After the test succeeds, continue to the next step.
  </Tab>

  <Tab title="Custom provider">
    Add at least one custom provider and complete the model test.
  </Tab>
</Tabs>

### Configure Recommended Models

This step decides which models users can choose from. Start with a clear primary set so users can choose by task complexity. A common setup is:

| Model      | Best for                                               |
| ---------- | ------------------------------------------------------ |
| **Opus**   | Complex tasks and high-quality output                  |
| **Sonnet** | Everyday tasks with a good balance of quality and cost |
| **Haiku**  | Lightweight tasks and fast responses                   |

### Set chat model

This step sets the default model for sidebar **AI Chat**. The model must come from the recommended model list, so if this step is disabled, the previous step is usually incomplete.

You should choose a stable model that supports tool calling and has already been tested. Otherwise, Agent capability will be noticeably limited.

### Optional. Configure Voice input

**Voice input** lets users enter messages in AI Chat with a microphone.

You can adjust **Max session duration (seconds)** and **Session creates per minute per user**. After voice input is enabled and saved, users will see the microphone button in the AI Chat input box.

### Configure the Runtime and App Builder

Complete **AI Chat Runtime** first, then complete **App Builder**.

<Steps>
  <Step title="Finish AI Chat Runtime">
    In **AI Chat Runtime**, enter and verify the **Vercel API Token**, select **Team** and **Project**, click **Save**, then click **Test Connection**. After the connection test succeeds, the matching item in the **Pending configuration** panel will turn green.
  </Step>

  <Step title="Finish the basic App Builder setup">
    In **App Builder**, enter the **Vercel access token** under **Vercel Deploy**. This is the core setting required to publish apps.
  </Step>
</Steps>

If you also need a custom domain, or if your server cannot access the Vercel API directly, you can add these optional settings:

| Optional item            | When you need it                                                                          |
| ------------------------ | ----------------------------------------------------------------------------------------- |
| **Custom domain**        | When you want to publish apps under your own domain                                       |
| **App Auth**             | When generated apps need **Email OTP** or **Google** sign-in                              |
| **Vercel API proxy URL** | When your server cannot reach the Vercel API directly, or when you use a proxy or gateway |

In **App Auth**, you can configure sign-in providers for generated apps:

* **Email OTP** uses an independent SMTP mailbox for app login verification emails.
* **Google OAuth** requires a Client ID and Client Secret. Add the redirect URI shown on this page to the authorized redirect URI list in Google Cloud Console.

**Teable** sign-in is available by default. **Email OTP** appears in App Builder only after the SMTP settings are complete, and **Google** appears only after both OAuth credentials are configured.

<Tip>
  Click **Test Public Access** in the page and confirm that both your **Teable instance** and **object storage (MinIO / S3)** are publicly accessible.
</Tip>

**How to verify the setup is complete**

After the setup is done, first confirm that all required items in the **Pending configuration** panel are green. Then test **AI Chat**, **AI fields**, **AI automation**, and **App Builder** one by one.

## FAQ

<AccordionGroup>
  <Accordion title="The chat model option is disabled">
    Go back and finish **Configure recommended models** first. The chat model can only be selected from the recommended model list.
  </Accordion>

  <Accordion title="I entered the API key, but the right-side status is still not green">
    Check the **Pending configuration** panel first to see which item is still missing. In many cases, the current step is saved correctly, but an earlier requirement is still incomplete.
  </Accordion>

  <Accordion title="The page says Vercel Sandbox configuration is still missing">
    This usually means **AI Chat Runtime** is not fully configured yet. Make sure all three items below are completed:

    * **Vercel API Token**
    * **Team**
    * **Project**

    Entering only the token is not enough. After choosing **Team** and **Project**, save the selection before testing the connection.
  </Accordion>

  <Accordion title="I get a credit exceeded error">
    Check your Vercel account `Credit` or balance first. Top up if needed, and make sure auto top-up is enabled.
  </Accordion>

  <Accordion title="If I use Vercel AI Gateway, will AI models process my data?">
    If you use **Vercel AI Gateway**, request data will still be sent to the model provider you selected for processing, so third-party providers may be involved.

    If you have data security or compliance requirements, enable this option in **Vercel AI Gateway**:

    * **Only allow providers with Zero Data Retention (ZDR)**

    After you enable it, available models will be limited to providers that support **Zero Data Retention**.

    <Note>
      Even with ZDR enabled, requests are still sent to the selected model provider for processing. The difference is that usage is limited to providers that support zero data retention.
    </Note>
  </Accordion>
</AccordionGroup>
