# Anthropic Claude cost tracking

Wrap the Anthropic client and every Messages call is priced at Anthropic's list rates: cache reads, 5-minute and 1-hour cache writes kept apart, Batch, long-context rates and Priority Tier.

## Wrap the client

```python [Python]
import veqen
from anthropic import Anthropic

veqen.init()  # reads VEQEN_API_KEY, an ingest key
client = veqen.wrap(Anthropic(), feature="assistant")

with veqen.tags(customer=org.id):
    client.messages.create(model="claude-sonnet-4-5", max_tokens=1024, messages=messages)
```

```ts [TypeScript]
import Anthropic from "@anthropic-ai/sdk";
import { wrap, withTags } from "@veqen/sdk";

const client = wrap(new Anthropic(), { feature: "assistant" });

await withTags({ customer: org.id }, () =>
  client.messages.create({ model: "claude-sonnet-4-5", max_tokens: 1024, messages }));
```

Claude on Bedrock or Vertex? Wrap `AnthropicBedrock` or `AnthropicVertex` the same way and the calls count toward that cloud's bill: see [AWS Bedrock](/integrations/bedrock) and [Google Gemini and Vertex AI](/integrations/google).

## Reconcile to the bill

Under Settings › Connections, add an organization-scoped Anthropic key with cost-report access. Veqen imports billed cost per model, and prices Priority Tier usage from the usage report, then compares both with what you tracked.

## Next

- [Track Claude Code costs](/guides/track-claude-code-costs).
- [Reconciliation](/docs/reconciliation).
- [Anthropic model prices](/providers/anthropic).
