pub struct EstimateResponse {
pub estimated_cost_ticks: i64,
pub estimated_cost_usd: f64,
pub model: String,
}Expand description
Response shape from POST /qai/v1/chat/estimate. Returned by
Client::estimate_chat.
estimated_cost_ticks is the upfront reservation the actual
chat call would book — it’s a worst-case ceiling, not a
prediction of the final settle. For text-only payloads, expected
settle is close to this number; for video / multimodal inputs
the ceiling can over-estimate (Gemini’s reasoning budget +
max_tokens cap drive the output side) and the post-call
settle refunds the difference. Either way, this is the number
the user must have available to send the request.
estimated_cost_usd is the same value pre-divided by
TicksPerUSD for convenience — no need to know the per-tick
rate on the client.
Fields§
§estimated_cost_ticks: i64§estimated_cost_usd: f64§model: StringEcho of the model name the estimate was computed against — handy when the caller wants to display “≈ X credits on gemini-flash-latest” without re-reading the request.
Trait Implementations§
Source§impl Clone for EstimateResponse
impl Clone for EstimateResponse
Source§fn clone(&self) -> EstimateResponse
fn clone(&self) -> EstimateResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more