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

# Anthropic (Claude)

> Connect MIRA to Anthropic's Claude models.

MIRA supports Anthropic's Claude models for both the **RLM** and **Native Agent** engines. You can use any Claude model available on your Anthropic API account — not just the suggestions shown in the UI.

## Setup

<Steps>
  <Step title="Get an API key">
    Log in to [console.anthropic.com](https://console.anthropic.com) and create an API key.
  </Step>

  <Step title="Save the key in MIRA">
    Press ⌘, → **API Tokens** tab → click **Add token**.

    | Field   | Value                             |
    | ------- | --------------------------------- |
    | Label   | `Anthropic API Key` (or any name) |
    | Env var | `ANTHROPIC_API_KEY`               |
    | Value   | Your `sk-ant-…` key               |

    Click **Save**. The key is encrypted with `safeStorage` and injected as an environment variable each time an engine starts.
  </Step>

  <Step title="Select Anthropic in the Engine tab">
    Press ⌘, → **Engine** tab → in the **Provider & Model** section, click the **Anthropic** button.
  </Step>

  <Step title="Enter a model ID">
    MIRA shows suggestion chips for common Claude models. You can also type any valid model ID directly into the **Model ID** field — any model your API key has access to works.

    | Model             | ID                           | Best for                          |
    | ----------------- | ---------------------------- | --------------------------------- |
    | Claude 3.5 Sonnet | `claude-3-5-sonnet-20241022` | Balanced speed and quality        |
    | Claude 3.5 Haiku  | `claude-3-5-haiku-20241022`  | Fast responses, lower cost        |
    | Claude 3 Opus     | `claude-3-opus-20240229`     | Complex reasoning, long documents |
  </Step>

  <Step title="Save">
    Click **Save & restart bridge**. The engine restarts automatically.
  </Step>
</Steps>

## Suggested models

The following models appear as quick-select chips. You are not limited to these — type any valid Claude model ID into the **Model ID** field.

| Model             | ID                           | Notes                         |
| ----------------- | ---------------------------- | ----------------------------- |
| Claude 3.5 Sonnet | `claude-3-5-sonnet-20241022` | Strong reasoning, widely used |
| Claude 3.5 Haiku  | `claude-3-5-haiku-20241022`  | Fast, cost-effective          |
| Claude 3 Opus     | `claude-3-opus-20240229`     | Highest capability, slower    |

<Tip>
  Anthropic regularly releases newer Claude versions. Paste any model ID from the [Anthropic models
  page](https://docs.anthropic.com/en/docs/about-claude/models) directly into the **Model ID**
  field.
</Tip>

## Streaming

MIRA streams Claude responses using Anthropic's streaming API. All models support streaming.

## Troubleshooting

| Error                      | Fix                                                        |
| -------------------------- | ---------------------------------------------------------- |
| `401 Authentication error` | API key is incorrect — check it in the Anthropic console   |
| `529 Overloaded`           | Anthropic API is under high load — retry in a few seconds  |
| `model_not_found`          | Model ID is invalid or your key does not have access to it |

<Note>
  Edit this page — [Open a pull
  request](https://github.com/satyendra2013/mira-app/edit/main/docs/configuration/providers/anthropic.mdx)
</Note>
