Skip to content

Connect an OpenAI-compatible API

Many AI services and servers speak the same API format as OpenAI. atbridge.ai works with all of them through one provider option, OpenAI-compatible (custom URL). You don’t install anything or wait for an integration: enter the service’s base URL and API key, and the atbridge AI Chat uses it like any other provider.

Typical cases:

  • A model on your own machine or server: LM Studio, vLLM, the llama.cpp server, LocalAI.
  • A proxy your company runs, e.g. LiteLLM in front of several providers.
  • An API gateway or reseller that gives you access to models through an OpenAI-compatible endpoint.
  • Base URL: the API address from your provider’s documentation. It is the same value the OpenAI SDK calls base_url, for example https://llm.example.com/v1. Paste it exactly as documented; atbridge.ai accepts it with or without the trailing /v1.
  • API key: created in your provider’s dashboard. A local server that doesn’t check keys accepts any placeholder, such as local.

The service must support two standard OpenAI endpoints with Authorization: Bearer authentication: /v1/chat/completions (the chat itself) and /v1/models (the model list, which atbridge.ai also uses to check the connection). Almost every OpenAI-compatible service and local server provides both.

Common local servers and their usual base URLs (check your own setup):

ServerUsual base URL
LM Studiohttp://localhost:1234/v1
vLLMhttp://localhost:8000/v1
llama.cpp serverhttp://localhost:8080/v1
LiteLLM proxyhttp://localhost:4000
  1. In Thunderbird, open the atbridge Settings: the gear, or Tools → Add-ons and Themes → atbridge.ai → Options (see Open the extension settings). Go to the AI providers tab.

  2. In the Provider dropdown, pick OpenAI-compatible (custom URL).

  3. Fill in Base URL and paste your key into API key. The key is encrypted on this device and never reaches atbridge.ai’s servers.

  4. Click Connect. atbridge.ai checks the address and the key right away by asking for the model list. When the check passes, the status turns to a green ✓; if it fails, nothing is saved and you see the reason.

Open the atbridge AI Chat (the @b button in Thunderbird) and pick a model from the model dropdown, which shows the models the service reports. A gateway can list hundreds of models; to use one by its exact name, type it into custom model id under Settings → Preferred AI provider & model.

With an OpenAI-compatible provider, your prompts, and any email text or attachments you give the AI Chat, are sent to the base URL you entered. atbridge.ai doesn’t proxy or store them. Before you connect a service, check that you trust whoever runs it, and read its privacy and data-retention terms. For mail that must not leave your computer, use a local server (the table above) or Ollama.

The same connection from a terminal; the key is read from standard input, so it stays out of your shell history:

Terminal window
echo "$MY_API_KEY" | atbridge connect activate --provider openai-compatible \
--base-url https://llm.example.com/v1 --key-stdin
  • 404 or “not found”: the base URL is wrong. Copy it again from the provider’s documentation; usually it’s the address that ends in /v1.
  • 401 or 403: the key is wrong, expired, or has no access to that model.
  • The URL is right but Connect still fails: the service may not provide the model list (/v1/models), which atbridge.ai needs to check the connection. Ask your provider whether it supports it.
  • The chat answers but never looks into your mail: the model doesn’t support tool calling. Pick another model.

Was this page helpful?