> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/relay/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Struct Cost Estimate

> Normalized LLM response cost.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi`.

<pre />

Normalized LLM response cost.

Provider-reported cost is preserved as-is. Model-pricing estimates include source and as-of metadata so downstream systems can audit stale pricing tables without losing a usable estimate.

## Fields

### `total: Option<f64>`

Total cost in `currency`.

### `currency: String`

ISO 4217 currency code for the cost fields.

### `input: Option<f64>`

Uncached prompt/input token cost in `currency`.

### `output: Option<f64>`

Completion/output token cost in `currency`.

### `cache_read: Option<f64>`

Prompt cache read cost in `currency`.

### `cache_write: Option<f64>`

Prompt cache write cost in `currency`.

### `source: CostSource`

Origin of this cost value.

### `pricing_provider: Option<String>`

Provider associated with the cost or pricing estimate, if known.

### `pricing_model: Option<String>`

Model ID associated with the cost or pricing estimate, if known.

### `pricing_as_of: Option<String>`

Date the pricing value was last verified, if known.

### `pricing_source: Option<String>`

Source URL or label for the pricing value, if known.

## Implementations

### `impl CostEstimate`

<pre />

#### `total_or_component_sum`

<pre />

Returns the explicit total, or the sum of component costs when no total was supplied.

#### `total_for_currency`

<pre />

Returns the total only when it is denominated in the requested currency.

#### `total_or_component_sum_for_currency`

<pre />

Returns the explicit or component-derived total in the requested currency.

## Trait Implementations

### `impl Clone for CostEstimate`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for CostEstimate`

<pre />

#### `fmt`

<pre />

### `impl<'de> Deserialize<'de> for CostEstimate`

<pre />

#### `deserialize`

<pre />

### `impl PartialEq for CostEstimate`

<pre />

#### `eq`

<pre />

#### `ne`

<pre />

### `impl Serialize for CostEstimate`

<pre />

#### `serialize`

<pre />

### `impl StructuralPartialEq for CostEstimate`

<pre />