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

# Manage LLM providers

> Add the model account your agents use, point a sub-agent at it, and change or delete it safely

A provider is the account your agents call an AI model through, such as your OpenAI or Anthropic account, together with the model to use. This guide adds a provider, points a sub-agent at it, and shows how to change and delete one.

On a self-hosted instance, every sub-agent needs a provider. On ServFlow Cloud, a sub-agent with no provider uses built-in model access paid from your team's monthly or bought credit, so you add a provider only to use your own key, or to give one sub-agent a model other than your team's built-in model. See [Built-in model access on ServFlow Cloud](https://docs.servflow.io/concepts/providers.md#built-in-model-access-on-servflow-cloud).

## Before you begin

* A ServFlow account at [dash.servflow.io](https://dash.servflow.io), or a [self-hosted instance](https://docs.servflow.io/installation.md).
* An API key from the company whose models you want to use. You enter the key yourself. After you save it, it is hidden.

## Add a provider

**1. Open the Providers page**

In the sidebar under **Configure**, open **Providers**. The page lists the providers you already have.

![The Providers page with the New Provider button in the top right](https://mintcdn.com/servflow/Tigm2DtWfuvgudby/images/guides/manage-llm-providers/01-providers-page.png?fit=max\&auto=format\&n=Tigm2DtWfuvgudby\&q=85\&s=12d93bff3732f45af0e0b36ba583c777)

**2. Click New Provider**

Click **New Provider** in the top right. The **New Provider** dialog opens.

![The New Provider dialog with five type cards: Claude, LiteLLM, OpenAI, OpenRouter, and Qwen](https://mintcdn.com/servflow/Tigm2DtWfuvgudby/images/guides/manage-llm-providers/02-new-provider.png?fit=max\&auto=format\&n=Tigm2DtWfuvgudby\&q=85\&s=99986d3f90b1e6d01582741327f1100e)

**3. Choose a type**

Under **Type**, click the card for your model company: Claude, LiteLLM, OpenAI, OpenRouter, or Qwen. The fields below the cards change to match.

LiteLLM, OpenRouter, and Qwen also ask for the web address of the service. OpenRouter adds a **Reasoning** setting. Leave it on its default unless you know you need it.

**4. Enter a name**

Enter a **Name**, for example `OpenAI production`. This is the name you choose in a sub-agent.

**5. Enter your API key**

Enter your key under **API Key**. The field hides what you type. If you do not have a key yet, the link under the field opens the company's page for creating one.

**6. Choose a model**

Under **Model**, pick a model from the list or type a model name.

![The New Provider dialog with OpenAI selected and a name entered](https://mintcdn.com/servflow/Tigm2DtWfuvgudby/images/guides/manage-llm-providers/03-new-provider-filled.png?fit=max\&auto=format\&n=Tigm2DtWfuvgudby\&q=85\&s=99b84ea663eb6e1fab2ffcbe00093a70)

**7. Click Add Provider**

Click **Add Provider**. The dialog closes and the provider appears in the list with its type and model.

## Point a sub-agent at the provider

**1. Open a sub-agent**

In the sidebar under **Build**, open **Agents** and open an agent. Click a sub-agent on the canvas. Its panel opens.

**2. Choose the provider**

Under **Provider**, choose the provider. The panel confirms with "Calls" and the provider's name.

![A sub-agent panel with a provider chosen under Provider](https://mintcdn.com/servflow/545ICsSSJFr63lId/images/guides/manage-llm-providers/05-subagent-provider.png?fit=max\&auto=format\&n=545ICsSSJFr63lId\&q=85\&s=d6c465784ea9c83f852324c33436c6b6)

**3. Save**

Click **Save** in the top bar.

On ServFlow Cloud, to switch a sub-agent back to built-in model access, clear its **Provider** setting and save.

## Use a different model for one sub-agent

The model belongs to the provider, not to the sub-agent, so a sub-agent's panel has no model setting. To give one sub-agent a different model, add a second provider of the same type with the other model, and choose it in that sub-agent. The same API key works for both.

## Change a provider's key or model

To change a provider's type, add a new provider instead. The type of an existing provider is fixed.

**1. Open the provider**

On the **Providers** page, click the **Edit provider** icon on the provider's row. The **Edit Provider** dialog opens.

![The Edit Provider dialog with the type locked and the API key hidden](https://mintcdn.com/servflow/Tigm2DtWfuvgudby/images/guides/manage-llm-providers/04-edit-provider.png?fit=max\&auto=format\&n=Tigm2DtWfuvgudby\&q=85\&s=9e6cec207d0c870c5c95561bd58fe387)

**2. Change the key or the model and save**

Enter a new **API Key** or choose another **Model**, then click **Save Changes**. Every agent that uses the provider picks up the change on its next run. You do not need to save the agents again.

## Delete a provider

Before you delete a provider, point every sub-agent that uses it at another one. ServFlow does not stop the delete, and an agent left pointing at a deleted provider fails the next time it runs.

On the **Providers** page, click the **Delete provider** icon on the provider's row and confirm.

## Manage providers from the CLI

To create a provider from a file, write its name, type, and config, and pass it to `create`:

```bash theme={null}
servflowai resource provider create -f provider.json
```

For every command and the body each one takes, see the [CLI reference](https://docs.servflow.io/references/cli.md#provider).

## Related

> [card] [Providers](https://docs.servflow.io/concepts/providers.md)
>
> What a provider is and why sub-agents share one.

> [card] [Available providers](https://docs.servflow.io/references/providers.md)
>
> Every provider type and its fields.

> [card] [Create an agent](https://docs.servflow.io/guides/create-an-agent.md)
>
> Build an agent and choose a provider for each sub-agent.

> [card] [Secrets](https://docs.servflow.io/concepts/secrets.md)
>
> Where tokens for integrations are kept, and why a provider's key is not one of them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.