---
title: useCompletion
description: API reference for the useCompletion hook.
url: "https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-completion"
docs_index: /llms.txt
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

Allows you to create text completion based capabilities for your application. It enables the streaming of text completions from your AI provider, manages the state for chat input, and updates the UI automatically as new messages are received.

## Import

## API Signature

### Type Parameters

### Parameters

### Returns

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)