Automatic tracking for Anthropic Claude API calls in TypeScript
providers: ['anthropic']
:
@traceloop/instrumentation-anthropic
library, streaming responses show as “Response received” instead of the actual content.
Workaround for streaming:
Model | Input Cost | Output Cost |
---|---|---|
Claude 3 Opus | $0.015/1K | $0.075/1K |
Claude 3.5 Sonnet | $0.003/1K | $0.015/1K |
Claude 3 Haiku | $0.00025/1K | $0.00125/1K |
Claude 4 | $0.032/1K | $0.096/1K |
lai.init()
providers: ['anthropic']
is set