struct

Arcana::AI::Image::Result

Inherits Struct < Value < Object

Constructors

new(output_path : String, model : String, provider : String, cost : Pricing::Cost | Nil = nil, raw_request : String = "", raw_response : String = "", usage : Usage | Nil = nil)
Source

Instance methods

cost(at : Time = Time.utc, table : Pricing::Table = Pricing::Table.default) : Pricing::Cost | Pricing::Unpriced

What this call cost; see Pricing. at is when it was made. The provider's own figure when it reported one, otherwise its usage at the table's rates.

Source
model
Source
model=(model : String)
Source
output_path
Source
output_path=(output_path : String)
Source
provider
Source
provider=(provider : String)
Source
raw_request
Source
raw_request=(raw_request : String)
Source
raw_response
Source
raw_response=(raw_response : String)
Source
reported_cost

What the provider said the call cost, when it says so itself (Runware, or a service that prices its own work); nil otherwise.

Source
reported_cost=(reported_cost : Pricing::Cost | Nil)

What the provider said the call cost, when it says so itself (Runware, or a service that prices its own work); nil otherwise.

Source
usage

What the call used, when the provider reports it in tokens (OpenAI); nil when it didn't. cost prices it.

Source
usage=(usage : Usage | Nil)

What the call used, when the provider reports it in tokens (OpenAI); nil when it didn't. cost prices it.

Source