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

# AI SDK

> Use the official AI Stats provider for the Vercel AI SDK.

AI Stats ships an official Vercel AI SDK provider in the `@ai-stats/ai-sdk-provider` package.

## Install

```bash theme={null}
npm install @ai-stats/ai-sdk-provider ai
```

## Basic usage

```ts theme={null}
import { aiStats } from "@ai-stats/ai-sdk-provider";
import { generateText } from "ai";

const result = await generateText({
	model: aiStats("openai/gpt-4o"),
	prompt: "Summarize this in one sentence.",
});
```

## Notes

* Use model ids from the [Models endpoint](../../api-reference/endpoint/models.mdx).
* The provider supports the AI SDK primitives for text, images, audio, and embeddings.
