> ## Documentation Index
> Fetch the complete documentation index at: https://www.narev.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# NarevClient

[**@ai-billing/narev**](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/index.md)

***

[@ai-billing/narev](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/index.md) / NarevClient

# Interface: NarevClient

Defined in: [packages/narev/src/narev-client.ts:27](https://github.com/narevai/ai-billing/blob/main/packages/narev/src/narev-client.ts#L27)

Typed client for the Narev billing API.

Covers model/provider reference,
pricing lookups, and cost calculation.

## Methods

### listModels()

> **listModels**(`request?`): `Promise`\<[`ModelsResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/ModelsResponse)>

Defined in: [packages/narev/src/narev-client.ts:29](https://github.com/narevai/ai-billing/blob/main/packages/narev/src/narev-client.ts#L29)

Returns a paginated list of model references (provider\_id + model\_id, no pricing).

#### Parameters

##### request?

[`ListModelsRequest`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/ListModelsRequest)

#### Returns

`Promise`\<[`ModelsResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/ModelsResponse)>

***

### listProviders()

> **listProviders**(): `Promise`\<[`ProvidersResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/ProvidersResponse)>

Defined in: [packages/narev/src/narev-client.ts:32](https://github.com/narevai/ai-billing/blob/main/packages/narev/src/narev-client.ts#L32)

Returns all supported providers with their display name.

#### Returns

`Promise`\<[`ProvidersResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/ProvidersResponse)>

***

### listPrices()

> **listPrices**(`request?`): `Promise`\<[`PriceResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/PriceResponse)>

Defined in: [packages/narev/src/narev-client.ts:35](https://github.com/narevai/ai-billing/blob/main/packages/narev/src/narev-client.ts#L35)

Returns a paginated list of pricing entries filtered by provider and/or model.

#### Parameters

##### request?

[`ListPricesRequest`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/ListPricesRequest)

#### Returns

`Promise`\<[`PriceResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/PriceResponse)>

***

### searchPrices()

> **searchPrices**(`request?`): `Promise`\<[`PriceResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/PriceResponse)>

Defined in: [packages/narev/src/narev-client.ts:38](https://github.com/narevai/ai-billing/blob/main/packages/narev/src/narev-client.ts#L38)

Searches pricing entries by model ID (full-text search via `q`).

#### Parameters

##### request?

[`SearchPricesRequest`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/SearchPricesRequest)

#### Returns

`Promise`\<[`PriceResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/PriceResponse)>

***

### calculateCost()

> **calculateCost**(`request`): `Promise`\<[`TraceCostResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/TraceCostResponse)>

Defined in: [packages/narev/src/narev-client.ts:41](https://github.com/narevai/ai-billing/blob/main/packages/narev/src/narev-client.ts#L41)

Calculates the cost for a model call given token usage.

#### Parameters

##### request

[`TraceCostRequest`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/TraceCostRequest)

#### Returns

`Promise`\<[`TraceCostResponse`](https://www.narev.ai/docs/ai-billing/reference/narev/typedoc/interfaces/TraceCostResponse)>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.