> This page is for NeMo Relay, version v1.0.0.
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.2) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v1.0.0: https://docs.nvidia.com/nemo/relay/v1.0.0/llms.txt
> - v0.11.2: https://docs.nvidia.com/nemo/relay/v0.11.2/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/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

> For clean Markdown of any page, append .md to the page URL. For a task-oriented documentation index, fetch https://docs.nvidia.com/nemo/relay/llms.txt. Use the documentation version matching the installed NeMo Relay package: latest follows the latest stable release, vX.Y.Z identifies a retained release snapshot, and dev documents development changes. Preserve the selected version when following links; do not mix examples or API contracts from different versions. Fetch the relevant section's /llms.txt before individual pages instead of loading a complete version index.

# Struct Cost Estimate

> Normalized LLM response cost.

Generated from `cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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 WireValue<Box<CostEstimate>> for CostEstimate`

<pre />

#### `to_wire`

<pre />

#### `from_wire`

<pre />

### `impl WireValue<CostEstimate> for CostEstimate`

<pre />

#### `to_wire`

<pre />

#### `from_wire`

<pre />

### `impl StructuralPartialEq for CostEstimate`

<pre />