> ## 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.

# CreateXaiWithBilling

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

***

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

# Function: createXaiWithBilling()

> **createXaiWithBilling**(`modelId`): `LanguageModel`

Defined in: [packages/nextjs/src/wrapped.ts:118](https://github.com/narevai/ai-billing/blob/main/packages/nextjs/src/wrapped.ts#L118)

Returns an xAI language model wrapped with Narev pricing and Polar billing.

## Parameters

### modelId

`string`

The xAI model ID (e.g. `"grok-3"`).

## Returns

`LanguageModel`


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