bedrock-cost
AWS Bedrock invocation cost across vendors (Llama, Mistral, Cohere,
Titan, AI21). Cross-region inference profile aware (us., eu.,
apac.). Zero deps.
For Anthropic Claude models on Bedrock, use
claude-cost — it handles the
extra cache_creation / cache_read fields.
Usage
use ;
let p = default_pricing.unwrap;
let u = Usage ;
let cost_usd = p.cost_for;
Model id normalization
use default_pricing;
// Cross-region inference profile
assert_eq!;
// Full ARN
assert!;
Pricing notes
All rates are USD per 1,000,000 tokens (us-east-1 region) as of 2026-Q2. Bedrock prices vary by region — verify against https://aws.amazon.com/bedrock/pricing/ before billing.
License
MIT or Apache-2.0.