---
title: Anthropic provider setup
description: Configure Anthropic Claude API keys, native wire protocol, and model routing.
---

Zorveus natively supports the Anthropic wire protocol (`POST /v1/messages`, `POST /v1/messages/count_tokens`), allowing you to use official Anthropic SDKs directly or route Claude models through standard OpenAI-compatible endpoints.

<KeyInserter type="api" label="API Key Tester" placeholder="zrv_your_api_key" />

---

## Native Anthropic SDK integration

Point official Anthropic SDK clients to `https://api.zorveus.com` using your Zorveus API key:

<CodeGroup titles={["Python (anthropic)", "TypeScript (@anthropic-ai/sdk)", "cURL"]}>

```python
# pip install anthropic
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.zorveus.com",
    api_key="zrv_your_api_key",
)

response = client.messages.create(
    model="claude-3-7-sonnet-20250219",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Explain quantum computing in one sentence."}
    ],
)

print(response.content[0].text)
```

```typescript
// npm install @anthropic-ai/sdk
import Anthropic from "@anthropic-ai/sdk";

const anthropic = new Anthropic({
  baseURL: "https://api.zorveus.com",
  apiKey: "zrv_your_api_key",
});

const message = await anthropic.messages.create({
  model: "claude-3-7-sonnet-20250219",
  max_tokens: 1024,
  messages: [
    { role: "user", content: "Explain quantum computing in one sentence." }
  ],
});

console.log(message.content);
```

```bash
curl https://api.zorveus.com/v1/messages \
  -H "x-api-key: zrv_your_api_key" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-3-7-sonnet-20250219",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello via Zorveus!"}]
  }'
```

</CodeGroup>

---

## Bring Your Own Key (BYOK) setup

You can supply your organization's Anthropic API key to pay Anthropic directly while Zorveus manages user allowances and attribution.

- **Provider ID**: `anthropic`
- **Secret kind**: `api_key`
- **Default wildcard policy**: `anthropic/*`

Manage provider credentials in the Zorveus dashboard under **Provider Credentials**. Application code does not call a provider-credential API. Use a Zorveus API key for inference, not the upstream provider secret.

---

## How Zorveus processes Anthropic calls

1. **Authentication and limits**: Validates the API key (`x-api-key: zrv_...` or `Authorization: Bearer zrv_...`) and confirms user allowances.
2. **Credential injection**: When BYOK is configured, Zorveus securely decrypts and injects your Anthropic key. If a key encounters rate limits or quota exhaustion, Zorveus automatically fails over across backup credentials or system routes.
3. **Usage settlement**: The gateway calculates input/output tokens and settles cost against the organization or connected user wallet.
