# Anthropic

The `anthropic` provider access [Anthropic](https://www.anthropic.com/) models. Anthropic is an AI research company that offers powerful language models, including the Claude series.

```js
script({ model: "anthropic:claude-2.1" });
```

To use Anthropic models with GenAIScript, follow these steps:

1. Sign up for an Anthropic account and obtain an API key from their [console](https://console.anthropic.com/).

2. Add your Anthropic API key to the `.env` file:

   .env

   ```txt
   ANTHROPIC_API_KEY=sk-ant-api...
   ```

3. Find the model that best suits your needs by visiting the [Anthropic model documentation](https://docs.anthropic.com/en/docs/about-claude/models#model-names).

4. Update your script to use the `model` you choose.

   ```js
   script({
       ...
       model: "anthropic:claude-3-5-sonnet-20240620",
   })
   ```

### Aliases

The following model aliases are attempted by default in GenAIScript.

| Alias            | Model identifier         |
| ---------------- | ------------------------ |
| large            | claude-sonnet-4-0        |
| small            | claude-3-5-haiku-latest  |
| vision           | claude-sonnet-4-0        |
| vision\_small    | claude-3-5-sonnet-latest |
| reasoning        | claude-sonnet-4-0:high   |
| reasoning\_small | claude-sonnet-4-0:low    |

### Limitations

* logprobs (and top logprobs) ignored
* Ignore prediction of output tokens
* topLogprobs