> ## 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.

# Custom AI Model

> Enable AI capabilities in a space and add model providers for AI Fields, Automations, AI Chat, and App Builder.

<Tip>Available for Pro plan and above</Tip>

<Note>
  Custom model configuration applies to all Teable AI features, including **AI Chat**, **AI Fields**, **App Builder**, and **Automations**.

  Starting April 9, 2026, Teable's agent engine has been upgraded for **AI Chat** and **App Builder**. These agent-based features currently require Anthropic-compatible API endpoints. **Using an incompatible endpoint may cause errors.**

  * **Cloud users with BYOK:** Use one of the supported provider and model pairs listed in [**Agent Support Scope**](#agent-support-scope) below.
  * **Self-hosted users:** Please ensure your configured LLM endpoint is Anthropic-compatible. Alternatively, you can wait for our upcoming OpenAI-compatible endpoint support and pull the latest image once it's available.
  * **OpenAI-compatible endpoint support** is on our roadmap and will be added in a future release.

  **We recommend using Teable Credits.** Teable Credits are currently offered at cost — no middleman, no markup — giving you access to top-tier AI models at the most competitive pricing with the smoothest experience.
</Note>

After setup, the models you add can be used by **AI Fields**, **Automations**, **AI Chat**, and **App Builder** in the current space.

## Where to Configure It

1. Open the target space.
2. Click **Settings** in the top right corner.
3. Go to **AI settings**.

<img src="https://mintcdn.com/teablecn/TO9j-Q8_3sjEReNV/images/docs/ai/2026-05-21-custom-model-ai-settings.png?fit=max&auto=format&n=TO9j-Q8_3sjEReNV&q=85&s=719ff403a81baa5e91656734a04469d4" alt="AI settings page" className="docs-screenshot" width="1600" height="978" data-path="images/docs/ai/2026-05-21-custom-model-ai-settings.png" />

## Setup Steps

Under **AI Capabilities**, turn on what you need:

* **AI Field**
* **AI Chat**

### Add LLM Provider

Click **Add LLM provider** and fill in the following:

* **Name**: Used to distinguish different providers.
* **Provider type**: Select the provider type.
* **Base URL**: Enter the provider's API endpoint.
* **API Key**: Enter the API key from the provider.
* **Models**: Enter the model names you want to connect. Separate multiple models with English commas.

<img src="https://mintcdn.com/teablecn/TO9j-Q8_3sjEReNV/images/docs/ai/2026-05-21-custom-model-add-provider.png?fit=max&auto=format&n=TO9j-Q8_3sjEReNV&q=85&s=6f34465ed2c68d3f5f64280bb77d9a5e" alt="Add LLM provider dialog" className="docs-screenshot" width="1600" height="974" data-path="images/docs/ai/2026-05-21-custom-model-add-provider.png" />

#### Agent Support Scope

To use **AI Chat** and **App Builder** reliably, configure one of the supported models below. Models outside this list may still work for **AI Fields** or **Automations**, but they are not recommended for agent-based features. In **AI Chat** and **App Builder**, unsupported endpoints, providers, or models may produce weaker results, miss tool-use capabilities, or cause runtime errors. Teable does not provide troubleshooting or performance support for configurations outside this scope.

<Note>
  The providers below refer to the model service source. When adding an LLM provider in Teable, select an Anthropic-compatible endpoint, then enter the corresponding Base URL, API key, and model name.
</Note>

| Model provider                                                                    | Supported model |
| --------------------------------------------------------------------------------- | --------------- |
| [Anthropic](https://platform.claude.com) / [OpenRouter](https://openrouter.ai)    | Claude series   |
| [Moonshot AI](https://platform.moonshot.ai) / [OpenRouter](https://openrouter.ai) | Kimi K2.6       |
| [MiniMax](https://platform.minimax.io) / [OpenRouter](https://openrouter.ai)      | MiniMax M2.7    |

### Test Model Capabilities

There are currently three ways to test:

* Click **Test** on the LLM provider row.
* Click **Test** on an individual model row.
* Click **Test Model Capabilities** in the top-right corner of the list to batch-test all configured models.

If a model is meant for image generation, check **Image Generation Model** before running the test. Once checked, Teable tests it as an image model for text-to-image and image-to-image capabilities. If it is not checked, the model is tested as a regular text model.

## Configuration Tips

### Base URL

<Warning>Use the API endpoint URL, not the provider's website URL. Most OpenAI-compatible endpoints need to end with `/v1`. Unless the provider's documentation explicitly says otherwise, do not add an extra trailing `/`.</Warning>

<Warning>Teable does not support Coding Plan API keys. Please use a standard API key created in your provider dashboard. Coding Plan API keys usually only work inside specific coding tools and cannot be used as a general API key in Teable. If you use this kind of key, it is normal for model testing to fail.</Warning>

Common Base URL examples:

| Provider   | Base URL Format                                     |
| ---------- | --------------------------------------------------- |
| Anthropic  | `https://api.anthropic.com/v1`                      |
| OpenAI     | `https://api.openai.com/v1`                         |
| Google     | `https://generativelanguage.googleapis.com/v1beta`  |
| DeepSeek   | `https://api.deepseek.ai/v1`                        |
| Azure      | `https://{your-resource-name}.openai.azure.com`     |
| Mistral    | `https://api.mistral.ai/v1`                         |
| Qwen       | `https://dashscope.aliyuncs.com/compatible-mode/v1` |
| Zhipu AI   | `https://open.bigmodel.cn/api/paas/v4`              |
| XAI (Grok) | `https://api.x.ai/v1`                               |
| OpenRouter | `https://openrouter.ai/api/v1`                      |
| TogetherAI | `https://api.together.xyz/v1`                       |

### Models

<Note>Model names must match the provider documentation exactly and are case-sensitive. Separate multiple models with English commas.</Note>

Common model examples:

| Provider   | Example Models                                                               |
| ---------- | ---------------------------------------------------------------------------- |
| OpenAI     | `gpt-5.4, gpt-5.4-mini, gpt-5`                                               |
| Anthropic  | `claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5`                       |
| Google     | `gemini-3.1-pro-preview, gemini-3-flash, gemini-2.5-flash`                   |
| Azure      | `gpt-5.4, gpt-5, gpt-5-mini, gpt-4o`                                         |
| DeepSeek   | `deepseek-chat, deepseek-reasoner`                                           |
| XAI        | `grok-4, grok-4.1-fast`                                                      |
| Qwen       | `qwen3.5-plus, qwen3-max`                                                    |
| OpenRouter | `anthropic/claude-opus-4-6, google/gemini-3.1-pro-preview`                   |
| TogetherAI | `deepseek-ai/DeepSeek-R1, meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8` |
| Mistral    | `mistral-large-latest, mistral-medium-latest, codestral-latest`              |

Notes:

* Model names are case-sensitive. Use the exact names from the provider documentation.
* Some providers require no spaces after commas, for example `gpt-4o,gpt-4-turbo`.
* OpenRouter uses the format `provider/model-name`, for example `openai/gpt-4o`.
* For Azure, use the deployment name you created in Azure AI Foundry or Azure OpenAI Studio, not the base model name.

## FAQ

<AccordionGroup>
  <Accordion title="All model tests failed">
    Check whether the **Base URL** is correct, whether it was mistakenly filled with the provider homepage URL, or whether it has an extra trailing `/`. If you are using an OpenAI-compatible endpoint, also confirm that `/v1` is not missing.
  </Accordion>

  <Accordion title="I get a “Test failed” error">
    Check whether the **API Key** is valid and whether the account still has credits or permission to call the model.
  </Accordion>

  <Accordion title="Connection timeout">
    Check whether the **Base URL** is correct and whether your current environment can reach that address.
  </Accordion>

  <Accordion title="Model not found">
    Make sure the **Models** value matches the provider documentation exactly, including case and separator format.
  </Accordion>

  <Accordion title="Testing fails when I use a Coding Plan key">
    Teable does not support this kind of key. Create a standard **API Key** in your provider dashboard and test again.
  </Accordion>

  <Accordion title="The image generation model test result looks wrong">
    If the model is meant for image generation, check **Image Generation Model** first and then test again. Once checked, Teable tests text-to-image and image-to-image capabilities instead.
  </Accordion>
</AccordionGroup>
