struct

Smith::Pricing::Rates

Inherits Struct < Value < Object

US dollars per million tokens.

Constructors

free
Source
new(input : Float64, output : Float64, cache_write : Float64 | Nil = nil, cache_read : Float64 | Nil = nil)

Anthropic charges 1.25x the input rate to write the cache and 0.1x to read it. Both default from input so an override only has to state the two rates anyone publishes.

Source

Instance methods

cache_read
Source
cache_write
Source
input
Source
output
Source