> ## Documentation Index
> Fetch the complete documentation index at: https://www.narev.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Anthropic

> Pull the daily cost of your Anthropic organization's API use into Varne with an Admin API key.

The Anthropic source reads the [cost report](https://platform.claude.com/docs/en/api/admin-api/usage-cost/get-cost-report) of your organization. You get the daily cost in USD, split by line item and workspace.

## What you need

* An Anthropic **organization**. The Admin API is not available for individual accounts.
* An **Admin API key**. Its name starts with `sk-ant-admin`, and it differs from a regular API key. Only organization members with the admin role can create one.

**1. Create an Admin API key**

In the [Claude Console](https://console.anthropic.com), open **Settings**, then **Organization**, and create an Admin API key. Copy it, because the Console shows it only once.

**2. Add the source**

```yaml theme={null}
- id: anthropic_main
  name: Anthropic
  type: anthropic
  api_token_env: ANTHROPIC_ADMIN_KEY
```

Set `ANTHROPIC_ADMIN_KEY` where Varne runs. See [Configuration](https://www.narev.ai/docs/varne/v1/configuration/index.md#keep-secrets-out-of-the-file).

**3. Pull**

On the **Dashboard**, click **Pull** next to the source.

## Fields

| Field | Required | Description |
| - | - | - |
| `api_token` or `api_token_env` | one of | The Admin API key |
| `lookback_days` | no | Days of history per pull. Default 30 |

## What you see

A chart of cost per day, with one series for each line item of the report, such as the model and token type. Each row also carries the workspace id.

## Limits

* The cost report does not include Priority Tier costs, which Anthropic bills differently.
* Anthropic describes this endpoint as legacy and recommends a newer analytics endpoint for Enterprise plans. Varne uses the cost report, which works with an Admin API key.

## Troubleshooting

| Message | Likely cause |
| - | - |
| `401` or `403` | The key is not an Admin API key, or its owner lost the admin role |
| `Environment variable ... is not set` | `api_token_env` names a variable the container does not have |
| Empty chart after a pull | No cost in the last `lookback_days` days |


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