Anthropic integration

See the real cost of Claude—including prompt caching.

Observe Anthropic usage in your backend and keep cache reads, five-minute cache writes, one-hour cache writes, and normal input separate so each category can receive the right server-side price.

Start with your product

What it reads

Provider usage and request outcomes

  • Model, operation, provider request ID, and provider-returned token usage.
  • Uncached input, cache reads, five-minute and one-hour cache writes, and output.
  • Latency, completed streams, failures, timeouts, and cancellations.
  • Opaque product dimensions such as account, feature, and prompt version when you supply them.

What stays private

Claude still talks directly to your application

  • No prompts, message content, tool arguments, or Claude responses.
  • No Anthropic API key and no proxy between your app and Anthropic.
  • No customer email used as the revenue-to-cost join key.

How to connect

Instrument the client you already own

  1. Install one of the seven Grow or Die server SDKs.
  2. Create a write-only ingest key for the selected website.
  3. Wrap the Anthropic Messages client where transparent wrapping is supported, or observe the existing call with a typed helper.
  4. Consume streams to completion when you want final provider usage.
  5. Add opaque account and billing identifiers through the private identify call when customer profit is required.

What it unlocks

Cache-aware cost decisions

Grow or Die can rank model and feature cost, expose cache behavior, show cost per visitor, and identify cost-side profit leaks. With an exact identity and payment join, those costs can support customer-level contribution profit.

Current limits

Incomplete evidence does not become zero

Aggregate cache creation without a reliable TTL breakdown can remain unpriced. Provider-internal retries are outside the wrapper, and interrupted streams may report partial or unknown usage. Event-priced cost remains provisional until provider-organization billing is reconciled.

Primary source

Check the provider contract

See Anthropic’s official Messages API documentation for response usage and caching fields.