> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Anthropic (Claude)

> Anthropic's Claude models. Often the best pick for nuanced chat, long context, and careful reasoning.

[Anthropic](https://www.anthropic.com)'s Claude models are widely considered best-in-class for nuanced conversation, long-context reasoning, and careful following of detailed instructions.

<Note>
  Full walkthrough being written.
</Note>

## When to pick over OpenAI

* Long documents (Claude has very large context windows).
* Nuanced conversational AI.
* Tasks requiring careful instruction-following.

## Setup

`ANTHROPIC_API_KEY` in vly secrets. Use `@anthropic-ai/sdk` from a Convex action.

```typescript theme={null}
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });

const message = await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});
```

## Models

| Model | Use for |
| - | - |
| claude-opus-4-7 | Maximum capability; complex reasoning |
| claude-sonnet-4-6 | Balanced; the default for most use |
| claude-haiku-4-5 | Fast and cheap |

## Related

<CardGroup cols={3}>
  <Card title="OpenAI" icon="sparkles" href="/integrations/openai">
    Comparison.
  </Card>

  <Card title="AI chatbot recipe" icon="message-circle" href="/recipes/ai-chatbot">
    Use case.
  </Card>

  <Card title="Choosing an agent" icon="git-branch" href="/features/agents/choosing-an-agent">
    Anthropic powers Claude Code.
  </Card>
</CardGroup>


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