pub struct ModelPricing {
pub model_id: String,
pub input_price_per_million: f64,
pub output_price_per_million: f64,
pub batch_input_price_per_million: Option<f64>,
pub batch_output_price_per_million: Option<f64>,
pub cache_write_price_per_million: Option<f64>,
pub cache_read_price_per_million: Option<f64>,
pub tier: PricingTier,
pub currency: String,
pub updated_at: DateTime<Utc>,
}
Expand description
Pricing information for a model
Fields§
§model_id: String
Model ID this pricing applies to
input_price_per_million: f64
Input token price in USD per 1M tokens
output_price_per_million: f64
Output token price in USD per 1M tokens
batch_input_price_per_million: Option<f64>
Batch input token price in USD per 1M tokens (if available)
batch_output_price_per_million: Option<f64>
Batch output token price in USD per 1M tokens (if available)
cache_write_price_per_million: Option<f64>
Cache write price in USD per 1M tokens (if available)
cache_read_price_per_million: Option<f64>
Cache read price in USD per 1M tokens (if available)
tier: PricingTier
Pricing tier or category
currency: String
Currency code (usually “USD”)
updated_at: DateTime<Utc>
When this pricing was last updated
Trait Implementations§
Source§impl Clone for ModelPricing
impl Clone for ModelPricing
Source§fn clone(&self) -> ModelPricing
fn clone(&self) -> ModelPricing
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ModelPricing
impl Debug for ModelPricing
Source§impl<'de> Deserialize<'de> for ModelPricing
impl<'de> Deserialize<'de> for ModelPricing
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelPricing
impl RefUnwindSafe for ModelPricing
impl Send for ModelPricing
impl Sync for ModelPricing
impl Unpin for ModelPricing
impl UnwindSafe for ModelPricing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more