Skip to main content

Module pricing

Module pricing 

Source
Expand description

Centralised pricing logic for Anthropic models.

All cost calculations live here so that the engine, TUI, and any future consumer share a single source of truth. Update this file — and only this file — whenever Anthropic changes its pricing.

Prices are in USD per million tokens (as of 2026-06). Source: https://www.anthropic.com/pricing

ModelInputOutput
Fable$10.00$50.00
Opus$5.00$25.00
Sonnet$3.00$15.00
Haiku$1.00$5.00

Cache pricing (relative to input price):

  • Cache reads: 0.10× input price (prompt-cache hit)
  • Cache creation: 1.25× input price (5-minute TTL write)

Functions§

calculate_cost
Calculate the USD cost of a single model turn.