> This page is for NeMo Relay, version v0.8.4.
> For other versions, use one of these documentation indexes:
> - Latest (v0.10.0) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.10.0: https://docs.nvidia.com/nemo/relay/v0.10.0/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt
> - v0.6.0: https://docs.nvidia.com/nemo/relay/v0.6.0/llms.txt
> - v0.5.0: https://docs.nvidia.com/nemo/relay/v0.5.0/llms.txt

> 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 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-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

<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 for provider-reported costs only, 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 />