Claude Console AI cost and usage integration

Use the Claude Console Advanced Integration to collect costs and token usage billed through your Anthropic API organization. Yarken retrieves cost and usage reports through Anthropic's Admin API, matches usage with charges, attributes costs to users or API keys, and loads FOCUS-aligned records into AI Usage Data (aiConsumption).

Two different Anthropic integrations: Claude Console uses an organization Admin key beginning with sk-ant-admin01-. The separate Claude Enterprise Analytics integration collects Claude Enterprise Analytics data using a key beginning with sk-ant-api01-. The credentials are not interchangeable.


What the integration provides

  • Daily cost reporting: View supported Anthropic API costs by workspace, model, user, or API key.

  • Token usage: Track input, output, cache-read, and cache-write tokens, including separate 5-minute and 1-hour cache-write meters.

  • Unit prices: Review token quantities and unit prices expressed per 1 million tokens.

  • Tool costs: Review supported web search, code execution, and session charges.

  • Pricing categories: Differentiate Standard, Batch, and fast-mode (Premium) usage.

  • Attribution: Allocate charges proportionally or preserve them as Unattributed when individual attribution is unavailable.

  • FOCUS-aligned records: Analyze Claude Console costs alongside other supported AI providers.


Before you begin

Requirement

Details

Claude Console organization

The Anthropic API organization that owns the cost and usage reports.

Organization role

An organization admin or owner must create the Admin key.

Credentials

Console Admin key beginning with sk-ant-admin01-.

Yarken permissions

Use a Yarken administrator account to authorize the Advanced Connection.

Integration availability

Yarken has deployed and enabled the Claude Console integration for your environment.

Credential management

Store the secret in an organization-approved credential manager.

Supported data source

This integration covers Anthropic API usage billed through Claude Console. It does not include Claude.ai Team or Enterprise seat subscriptions or Claude usage billed through AWS Bedrock or Google Vertex AI. Use the separate Claude Enterprise Analytics integration for Claude Enterprise Analytics data.


Create a Claude Console Admin key

  1. Sign in to Claude Console at console.anthropic.com.

  2. Go to Settings > Admin keys.

  3. Create an Admin key for the organization you want Yarken to connect.

  4. Copy the key immediately and store it securely. Claude Console displays its secret only once.

Key type

Prefix

Supported

Console Admin key

sk-ant-admin01-

Yes

Claude Enterprise Analytics key

sk-ant-api01-

No

Standard API key

sk-ant-api03-

No

Security: Console Admin keys have organization-level administrative capabilities and are not restricted to read-only permissions. Yarken uses the key only for the read-only GET calls documented below and never creates, changes, or deletes your Anthropic resources. Handle the key as an administrator credential.


Authorize the Claude Console connection in Yarken

  1. Sign in to Yarken as an administrator.

  2. Go to Admin > Pipelines > Connections.

  3. Select the ADVANCED tab.

  4. Open the Claude Console API connection.

  5. Enter the required connection fields and select Connect.

    image-20261102-111853.png
    Claude Console API connection
  6. Confirm that the connection status changes to Connected.

Connection fields

Field

Required

Description

Base URI

Yes

Claude Console Admin API host. Default: https://api.anthropic.com.

Console Admin key

Yes

Enter your organization Admin key beginning with sk-ant-admin01-.

Anthropic-Version

Defaulted

Required Anthropic API version header. Default: 2023-06-01.

Connection validation: Yarken checks the key format and retrieves your organization ID and name. A Connected status confirms authorization but does not confirm successful ingestion. Validate the Advanced pipeline separately.

For shared authorization procedures, see Authorize Advanced Connections.

How Yarken uses the Admin key

Yarken sends HTTPS requests to https://api.anthropic.com using the x-api-key header and the anthropic-version header (default 2023-06-01). You can revoke the key in Claude Console > Settings > Admin keys.


How the integration works

  1. Retrieve costs. Read daily charges from the Claude Console cost report.

  2. Retrieve usage. Read daily token and supported tool request counts from the usage report.

  3. Match charges and usage. Associate each cost meter with the corresponding usage quantities and source dimensions.

  4. Attribute costs. Split charges across users or API keys where supported; retain unattributed costs.

  5. Transform records. Populate FOCUS-aligned consumption, model, pricing, attribution, and cost fields.

  6. Load AI Usage Data. Store the results in aiConsumption for review and reporting.

Data flow: Claude Console Admin API → Yarken Advanced Integration → cost and usage matching → attribution → AI Usage Data → Analytics.

Anthropic Admin API endpoints

API endpoint

What Yarken retrieves

GET /v1/organizations/me

Organization ID and name.

GET /v1/organizations/cost_report

Daily costs by workspace and cost-line description, including supported model, token meter, service tier, speed, context window, and region.

GET /v1/organizations/usage_report/messages

Daily token usage and web search requests by supported source dimensions, including workspace, user, and API key.

GET /v1/organizations/workspaces

Workspace names, including archived workspaces.

GET /v1/organizations/users

User names and email addresses.

GET /v1/organizations/api_keys

API key names and their associated users.

Yarken reads paginated responses and processes long date ranges in 31-day intervals. The cost and usage endpoints are required; if either fails, the sync loads no partial records. Workspace, user, and API key name lookups are best effort—if unavailable, Yarken can load IDs rather than names.


How Claude Console costs and usage become records

Match cost lines to usage

Anthropic provides daily cost lines for combinations of workspace, model, token type, context window, service tier, speed, and region. Yarken matches these to the corresponding usage report to identify quantities and derive prices.

Meter or charge type

How it appears

Input

Uncached input tokens.

Output

Generated output tokens.

Cache read

Input tokens read from cache.

Cache write

Separate 5-minute and 1-hour cache-write token meters.

Web search

A separate request-based tool charge.

Code execution and sessions

Time-based charges that may lack token quantities.

Attribute costs to users or API keys

Yarken allocates token-based cost lines in proportion to each user's or API key's token consumption. For web search, it uses request counts. The allocated parts add up to the original cost line, including the small remainder assigned to the final share. User-attributed records show an email address when available; API key records show the key name and associated user when available.

Unattributed costs: Charges without sufficient user or API key information stay in records labeled Unattributed. Examples include time-based code execution or session charges, usage with missing attribution, and cost whose usage is not yet available.

Workspace-level attribution

The integration also supports an optional workspace-level mode that retains one record per cost line and workspace rather than allocating each charge among users and API keys.

Derive token unit prices

Token unit prices are stored per 1 million tokens, not per individual token. Yarken derives prices from the reported cost and the relevant quantity. For token-based records:

Unit price per 1M tokens = (cost ÷ token quantity) × 1,000,000

For example, a USD 5.00 charge for 1,000,000 input tokens produces a stored unit price of USD 5.00 per 1M tokens. Request-based tool charges use their applicable request-pricing units instead.


Data loaded into AI Usage Data

The transformed records are stored in aiConsumption. In the default per-user mode, each record represents one day × workspace × cost line × user or API key. The cost line includes the applicable model, token type, context window, service tier, speed, and region. Raw source API responses are discarded after synchronization.

AI consumption field reference

Record identity and attribution

The source provider, organization, workspace, and attributed user or API key.

Field

Description

record_id

Stable row ID for repeated synchronization.

transaction_id

Groups related meter records for a model, workspace, day, and user or key.

collector_source

Claude Console

provider_name

Anthropic

publisher_name

Anthropic

invoice_issuer_name

Anthropic

service_name

Claude API

service_category

AI and Machine Learning

billing_account_id

Claude Console organization ID.

sub_account_id

Workspace ID; empty for the Default Workspace.

user_id

User ID, when attribution is available.

resource_name

User email, API key name, Unattributed, or workspace name.

Periods, model, and charge classification

Daily charge periods and model/source classifications.

Field

Description

billing_period_start

First day of the month (UTC).

billing_period_end

First day of the following month (exclusive).

charge_period_start

Start of the usage day (UTC).

charge_period_end

Start of the following day (exclusive).

charge_category

Usage.

charge_frequency

Usage-Based.

charge_description

Source cost-line description.

pricing_category

Standard, Batch, or Premium (fast mode).

sku_id

Model, token type, context window, and tier.

sku_meter

Token type or supported tool meter.

model_name

Model ID.

model_version

Version extracted from the model ID.

modality

text.

region_id

global or us.

region_name

Global or United States.

ingested_at

UTC ingestion timestamp.

Token quantities and pricing units

Token counts are recorded on the corresponding meter rows to avoid double counting.

Field

Description

consumed_quantity

Token count or supported web search requests; empty for some time-based charges.

consumed_unit

tokens or requests.

pricing_quantity

Corresponding source quantity used for pricing.

pricing_unit

1M tokens for token-based charges; requests for request-based charges.

input_tokens

Input tokens on input rows only.

output_tokens

Output tokens on output rows only.

cached_tokens

Cache-read or cache-write tokens on their respective rows.

total_tokens

Token total associated with the row.

Costs and unit prices

All costs are stored in USD, converted from source cents.

Field

Description

billing_currency

USD

list_unit_price

USD per 1 million tokens for token rows; cost per request for request-based rows.

contracted_unit_price

USD per 1 million tokens for token rows; cost per request for request-based rows.

list_cost

Source charge allocated to the row.

contracted_cost

Source charge allocated to the row.

billed_cost

Source charge allocated to the row.

effective_cost

Source charge allocated to the row.

Example: input-token consumption record

Field

Example value

charge_period_start

2026-09-01T00:00:00Z

charge_period_end

2026-09-02T00:00:00Z

resource_name

jane@example.com

model_name

claude-opus-5-5

sku_meter

uncached_input_tokens

pricing_category

Standard

input_tokens

1,000,000

consumed_quantity

1,000,000

pricing_unit

1M tokens

list_unit_price

5.00

contracted_unit_price

5.00

billed_cost

5.00

billing_currency

USD

region_name

Global

The example represents 1,000,000 input tokens at a stored unit price of USD 5.00 per million tokens, resulting in a billed cost of USD 5.00.


Run and monitor the Claude Console Advanced pipeline

  1. Go to Admin > Pipelines > Pipelines and select ADVANCED.

  2. Locate the Claude Console pipeline enabled for your environment.

  3. Select Run if you want to execute it immediately.

  4. Review the run status and run history to confirm that the integration completed successfully.

For shared pipeline controls and run history, see Manage Advanced pipelines.


Review and reconcile imported Claude Console data

  1. Go to Designer > Consumption > AI and select the required reporting year and month.

  2. Review the monthly Spend and Last Load values.

  3. Go to Analytics > AI Consumption.

  4. Identify records where the provider is Anthropic and the collector source is Claude Console, where those fields are available.

  5. Check workspace, model, user or API key, pricing category, token meters, and source costs.

  6. Compare the sum of billed costs with the Claude Console cost report for the same period, including Unattributed records.

The provider is Anthropic, but the collector source is Claude Console. Use both values to distinguish these records from other Anthropic integrations when the reporting fields are available.

Reconcile with the source report

Yarken allocates cost-line totals proportionally and keeps costs with no available attribution in Unattributed records. These amounts are included in the daily and monthly billed-cost totals, so the values can be reconciled with Claude Console cost reports.

Technical SQL reconciliation example

For technical users with access to the underlying table:

SQL
SELECT SUM(billed_cost)
FROM aiConsumption
WHERE provider_name = 'Anthropic'
  AND collector_source = 'Claude Console'
  AND billing_period_start = '2026-09-01T00:00:00Z';

Privacy and security

In per-user mode, records can include Anthropic user IDs, email addresses, API key names, workspace identifiers, model names, token counts, request counts, and costs. Yarken does not retrieve or store prompt text, model responses, uploaded files, or other conversation content through this integration.


Troubleshooting

Issue

What to do

The connection rejects your key type

Create a Console Admin key beginning with sk-ant-admin01-. Do not use a Claude Enterprise Analytics or standard model API key.

401 Authentication failed

Verify whether the Admin key is invalid, expired, or revoked; create a replacement as needed.

403 Forbidden

Confirm the key belongs to the intended organization and that the Admin API is available for that organization.

400 during a sync

The requested day may not yet be available in the cost or usage report. Review subsequent collection runs.

Connection is Connected, but data is missing

Check the Advanced pipeline run history and source reporting dates.

User or API key name is missing

Name lookup is best effort. A deleted user or key may appear as a source identifier.

Unattributed costs appear

Review whether the source supplied user or API key attribution and whether the charge is time-based.

One model has multiple rows on a day

Review token meter, pricing category, workspace, region, and user or API key before aggregating.

For generic integration issues, see Troubleshoot Advanced Integrations.


Current limitations

  • Daily detail: The finest supported reporting granularity is one day.

  • Claude Console only: This integration excludes Claude.ai Team and Enterprise seat subscriptions and Claude usage billed through AWS Bedrock or Google Vertex AI.

  • Time-based charges: Code execution and session charges may have no consumption quantity and remain Unattributed.

  • Reporting lag: The latest day's cost and usage may not yet be available from Anthropic. Unavailable days can be collected on later syncs.

  • Missing display names: Deleted users or API keys may show identifiers instead of names.

  • Both reports required: A sync does not write partial data when the required cost or usage report fails.


Frequently asked questions

Can I use a Claude Enterprise Analytics key?

No. Use a Claude Console Admin key beginning with sk-ant-admin01-. The Enterprise Analytics key belongs to a separate integration.

Can I use a standard Anthropic model API key?

No. Standard API keys do not provide access to the required organization Admin API reports.

How are token unit prices stored?

Per 1 million tokens. For example, one million tokens costing USD 5.00 have a stored token unit price of USD 5.00.

Why does the same model have multiple rows on one day?

Anthropic charges separately for token meters, service tiers, and other pricing dimensions. Yarken can also split charges by user or API key.

What does Unattributed mean?

A charge could not be linked to a specific user or API key. It remains included in the total cost.

Why is sub_account_id empty?

The usage belongs to the Default Workspace, which may have no workspace ID.

Can Yarken read prompts or model responses?

No. This integration retrieves cost, usage, and supported attribution metadata, not AI request content.

How do I disconnect?

Revoke the Admin key in Claude Console > Settings > Admin keys, or remove the Yarken connection.