# Add a provider

> Connect OpenRouter, Anthropic, a local server or any OpenAI-compatible endpoint, and check that it works.

## The providers

| Provider | What it is | What you enter |
|---|---|---|
| **OpenRouter** | Hundreds of models through one key, billed per call. Reports the exact cost it billed. | API key |
| **Anthropic** | Claude models from Anthropic, billed per token. | API key |
| **Ollama** | Local models on this computer. Free. | Server address, and a context length |
| **LM Studio** | Local models served by LM Studio. Free. | Server address (`http://localhost:1234`) |
| **TypeSafe** | Fast typed decisions (yes/no, pick one, score) for the Decision tier. Early access. | API key |
| **Other endpoint** | Any server that speaks the OpenAI chat API: a proxy, a gateway or another local server. | Name, address, and optionally a key, a list of models and how it bills |

## Steps

1. Open **Settings → Model Hub → Providers**.
2. Under **Add a provider**, select the provider's tile. Its dialog opens.
3. Enter the key or the address.
4. Select **Test**. The dialog shows *Connected*, or what went wrong.
5. Select **Done**.

The provider now shows under **Active** with a coloured dot and a few words: the number of models found, *No key*, *Not available* or *Problem*. Select an active tile to change it or test it again.

## Add another endpoint

1. Select the **Other endpoint** tile.
2. Enter a **Name** (lowercase letters, digits and dashes) and an **Address**, such as `http://localhost:4000/v1`.
3. Select **Add**. The endpoint's own dialog opens.
4. Fill in **API key** only if the server asks for one.
5. In **Models**, list the models to offer, separated by commas, or leave it empty to use the list the server gives.
6. Set **Billing** to how the server charges, so costs are counted correctly.

## Remove a provider

Open its dialog and select **Remove provider**. Tiers and roles that name its models keep them in their lists, and those models are skipped until the provider is back.

## Where your key is kept

Keys are stored in Obsidian's keychain. They are never written to the plugin's settings file.

## After adding a provider

If a model you expect is missing from a picker, run the command **Model Hub: Refresh model lists**.

## Related

- [Set up tiers and limits](tiers-and-limits.md)
- [Privacy and costs](privacy-and-costs.md)
