Skip to content

Anthropic

The anthropic provider access Anthropic models. Anthropic is an AI research company that offers powerful language models, including the Claude series.

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.

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

    .env
    ANTHROPIC_API_KEY=sk-ant-api...
  3. Find the model that best suits your needs by visiting the Anthropic model documentation.

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

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

Aliases

The following model aliases are attempted by default in GenAIScript.

AliasModel identifier
largeclaude-3-7-sonnet-latest
smallclaude-3-5-haiku-latest
visionclaude-3-7-sonnet-latest
vision_smallclaude-3-5-sonnet-latest
reasoningclaude-3-7-sonnet-latest:high
reasoning_smallclaude-3-7-sonnet-latest:low

Limitations

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