pub struct PricingConfig {
pub input_per_1m_tokens: f64,
pub output_per_1m_tokens: f64,
pub per_call: f64,
pub cached_input_per_1m_tokens: Option<f64>,
pub cache_write_per_1m_tokens: Option<f64>,
pub cache_read_multiplier: Option<f64>,
pub cache_write_multiplier: Option<f64>,
pub cache_pricing: Option<bool>,
}Expand description
Pricing configuration for an endpoint.
Fields§
§input_per_1m_tokens: f64Cost per 1M input tokens (USD).
output_per_1m_tokens: f64Cost per 1M output tokens (USD).
per_call: f64Flat cost per call (USD), used for MCP/agent endpoints.
cached_input_per_1m_tokens: Option<f64>Cost per 1M cached-input (prompt cache read) tokens (USD). When
unset, input_per_1m_tokens * cache_read_multiplier is used.
cache_write_per_1m_tokens: Option<f64>Cost per 1M cache-write (cache creation) input tokens (USD). When
unset, input_per_1m_tokens * cache_write_multiplier is used.
cache_read_multiplier: Option<f64>Multiplier applied to input_per_1m_tokens for cache reads when
cached_input_per_1m_tokens is unset. Default: 0.1.
cache_write_multiplier: Option<f64>Multiplier applied to input_per_1m_tokens for cache writes when
cache_write_per_1m_tokens is unset. Default: 1.25.
cache_pricing: Option<bool>Bill cache reads/writes at their cache rates (default true). Set
to false to bill every prompt token at the flat input price.