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

# UseChat

[**@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) / [index](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/index/index) / useChat

# Function: useChat()

> **useChat**(`options`): [`UseChatReturn`](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/index/interfaces/UseChatReturn)

Defined in: [packages/nextjs/src/chat/useChat.ts:64](https://github.com/narevai/ai-billing/blob/main/packages/nextjs/src/chat/useChat.ts#L64)

React hook that manages chat state, streaming, model selection, and tool calls.

## Parameters

### options

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

Hook configuration; see [UseChatOptions](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/index/interfaces/UseChatOptions.md).

## Returns

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


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