struct

Arcana::AI::Pricing::Line

Inherits JSON::Serializable < Struct < Value < Object

One priced part of a call.

Constructors

new(item : String, quantity : Int64, unit : String, rate : BigDecimal, amount : BigDecimal)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

amount
Source
item

"input", "cache_read", "cache_write", "cache_write_1h", "image_input", "output", "image_output", "audio_output" or "web_search", or for a reported cost, what it was for.

Source
quantity
Source
rate

USD per million tokens, or per thousand searches; for a reported cost, its USD.

Source
unit

"tokens" or "searches", or for a reported cost, what it was for ("images").

Source