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

# Getting Started

> Install the Tensormesh AI SDK provider and make your first serverless request.

## Install

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

Set your inference API key:

```bash theme={null}
export TENSORMESH_INFERENCE_API_KEY="YOUR_INFERENCE_API_KEY"
```

## Generate Text

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

const { text } = await generateText({
  model: tensormesh("deepseek-ai/DeepSeek-V4-Flash"),
  prompt: "Explain Tensormesh in one sentence.",
});

console.log(text);
```

## Stream Text

```ts theme={null}
import { streamText } from "ai";
import { tensormesh } from "@tensormesh/ai-sdk-provider";

const result = streamText({
  model: tensormesh("deepseek-ai/DeepSeek-V4-Flash"),
  prompt: "Count from 1 to 5 as a short comma-separated list.",
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}
process.stdout.write("\n");
```

## List Model IDs

Use the exact model IDs returned by the models endpoint.
This helper does not require an inference API key.

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

const models = await tensormesh.models.list();

for (const model of models.data) {
  console.log(model.id);
}
```
