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

# Provider Setup

> Configure LLM providers for MutagenT

# Provider Setup

Configure LLM providers to enable evaluations and optimization. Providers are managed through the dashboard. Use the CLI to verify and test your provider connections.

## Dashboard Configuration

All provider configuration is done through the MutagenT dashboard:

<Steps>
  <Step title="Navigate to Settings">
    Go to [app.mutagent.io/settings/providers](https://app.mutagent.io/settings/providers)
  </Step>

  <Step title="Add Provider">
    Click **Add Provider** and select your provider type
  </Step>

  <Step title="Enter Credentials">
    Provide your API key and any required configuration
  </Step>

  <Step title="Test Connection">
    Click **Test Connection** to verify the provider works
  </Step>

  <Step title="Save">
    Click **Save** to store the encrypted configuration
  </Step>
</Steps>

## OpenAI

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **OpenAI**
3. Enter your OpenAI API key (`sk-...`)
4. Select default model (e.g., `gpt-5`)
5. Optionally set organization ID
6. Click **Save**

### Required Fields

| Field         | Description                       | Example       |
| ------------- | --------------------------------- | ------------- |
| API Key       | Your OpenAI API key               | `sk-proj-...` |
| Default Model | Default model for operations      | `gpt-5`       |
| Organization  | OpenAI organization ID (optional) | `org-...`     |

## Anthropic

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **Anthropic**
3. Enter your Anthropic API key (`sk-ant-...`)
4. Select default model (e.g., `claude-sonnet-4-6`)
5. Click **Save**

### Required Fields

| Field         | Description                  | Example             |
| ------------- | ---------------------------- | ------------------- |
| API Key       | Your Anthropic API key       | `sk-ant-...`        |
| Default Model | Default model for operations | `claude-sonnet-4-6` |

## Google AI (Gemini)

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **Google AI**
3. Enter your Google AI API key (`AIza...`)
4. Select default model (e.g., `gemini-3-flash`)
5. Click **Save**

### Required Fields

| Field         | Description                  | Example          |
| ------------- | ---------------------------- | ---------------- |
| API Key       | Your Google AI API key       | `AIza...`        |
| Default Model | Default model for operations | `gemini-3-flash` |

## Azure OpenAI

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **Azure OpenAI**
3. Enter your Azure OpenAI credentials
4. Click **Save**

### Required Fields

| Field           | Description               | Example                                   |
| --------------- | ------------------------- | ----------------------------------------- |
| API Key         | Your Azure OpenAI API key | `abc123...`                               |
| Endpoint        | Azure resource endpoint   | `https://your-resource.openai.azure.com/` |
| Deployment Name | Model deployment name     | `gpt-5`                                   |
| API Version     | Azure API version         | `2024-12-01-preview`                      |

## AWS Bedrock

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **AWS Bedrock**
3. Enter your AWS credentials
4. Click **Save**

### Required Fields

| Field             | Description      | Example                       |
| ----------------- | ---------------- | ----------------------------- |
| Access Key ID     | AWS access key   | `AKIA...`                     |
| Secret Access Key | AWS secret key   | `wJalr...`                    |
| Region            | AWS region       | `us-east-1`                   |
| Default Model     | Bedrock model ID | `anthropic.claude-sonnet-4-6` |

## X.AI (Grok)

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **X.AI**
3. Enter your X.AI API key
4. Select default model (e.g., `grok-3`)
5. Click **Save**

### Required Fields

| Field         | Description                  | Example   |
| ------------- | ---------------------------- | --------- |
| API Key       | Your X.AI API key            | `xai-...` |
| Default Model | Default model for operations | `grok-3`  |

## Moonshot (Kimi)

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **Moonshot**
3. Enter your Moonshot API key
4. Select default model (e.g., `kimi-k2`)
5. Click **Save**

### Required Fields

| Field         | Description                  | Example   |
| ------------- | ---------------------------- | --------- |
| API Key       | Your Moonshot API key        | `sk-...`  |
| Default Model | Default model for operations | `kimi-k2` |

## Zhipu AI (GLM)

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **Zhipu AI**
3. Enter your Zhipu API key
4. Select default model (e.g., `glm-4`)
5. Click **Save**

### Required Fields

| Field         | Description                  | Example     |
| ------------- | ---------------------------- | ----------- |
| API Key       | Your Zhipu AI API key        | `zhipu-...` |
| Default Model | Default model for operations | `glm-4`     |

## Groq

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **Groq**
3. Enter your Groq API key
4. Select default model (e.g., `llama-3.3-70b-versatile`)
5. Click **Save**

### Required Fields

| Field         | Description                  | Example                   |
| ------------- | ---------------------------- | ------------------------- |
| API Key       | Your Groq API key            | `gsk_...`                 |
| Default Model | Default model for operations | `llama-3.3-70b-versatile` |

## Custom Provider

Use a custom provider for any OpenAI-compatible endpoint.

### Dashboard Setup

1. Go to **Settings** > **Providers**
2. Click **Add Provider** > **Custom**
3. Enter the base URL and API key
4. Click **Save**

### Required Fields

| Field         | Description                | Example                      |
| ------------- | -------------------------- | ---------------------------- |
| API Key       | API key for authentication | `your-api-key`               |
| Base URL      | OpenAI-compatible endpoint | `https://your-server.com/v1` |
| Default Model | Model identifier           | `your-model-name`            |

## Verifying Providers via CLI

After configuring providers in the dashboard, use the CLI to verify:

```bash theme={null}
# List all configured providers
mutagent providers list

# Example output:
# ID    Provider    Name                Status
# 1     openai      Production OpenAI   active
# 2     anthropic   Production Claude   active

# Get provider details (API key is masked)
mutagent providers get 1

# Test a provider connection
mutagent providers test 1
# Output: Connection: OK (model: gpt-5, latency: 342ms)
```

## Setting Default Provider

The default provider is set through the dashboard when creating or editing a provider configuration. Toggle the "Default" option on the provider you want to use as the default for evaluations and optimization.

<Note>
  Provider availability in the dashboard UI may differ from core platform support. Providers listed here are supported at the platform level.
</Note>

## Security

<Warning>
  Provider API keys are encrypted at rest and never exposed in API responses.
</Warning>

* Keys are stored encrypted at rest
* API responses always mask keys (e.g., `sk-...xxxx`)
* Access is scoped to your workspace
* Rotate keys regularly via the dashboard
* Use least-privilege API keys when possible
* Credential management is handled via the dashboard

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection test fails">
    Verify your API key is correct and has not expired. Check that the provider's API is accessible from your network.
  </Accordion>

  <Accordion title="Provider not showing in CLI">
    Make sure you are authenticated to the correct workspace. Run `mutagent providers list` to see all providers for your current workspace.
  </Accordion>

  <Accordion title="Optimization fails with provider error">
    Check that the model specified in the optimization config is available on your configured provider. Run `mutagent providers test <id>` to verify connectivity.
  </Accordion>

  <Accordion title="Rate limit errors">
    Your provider may be throttling requests. Check your provider's rate limits and consider upgrading your API plan or using a different provider.
  </Accordion>
</AccordionGroup>
