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

# Raw Inference Helpers

> Call additional Tensormesh endpoints exposed by the provider.

The provider includes direct helpers for Tensormesh endpoints that are not represented by an AI SDK language model object.

## Models

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

const models = await tensormesh.models.list();
console.log(models.data.map((model) => model.id));
```

## Responses

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

const response = await tensormesh.responses.create({
  model: "deepseek-ai/DeepSeek-V4-Flash",
  input: "Write a short product announcement.",
});

console.log(response);
```

For streaming Responses API calls:

```ts theme={null}
const stream = await tensormesh.responses.stream({
  model: "deepseek-ai/DeepSeek-V4-Flash",
  input: "Stream a short product announcement.",
});

const reader = stream.body?.getReader();
const decoder = new TextDecoder();

while (reader) {
  const { value, done } = await reader.read();
  if (done) break;
  process.stdout.write(decoder.decode(value, { stream: true }));
}
```

## Tokenize And Detokenize

```ts theme={null}
const tokenized = await tensormesh.tokenize.create({
  model: "deepseek-ai/DeepSeek-V4-Flash",
  prompt: "Hello from Tensormesh",
});

const detokenized = await tensormesh.detokenize.create({
  model: "deepseek-ai/DeepSeek-V4-Flash",
  tokens: tokenized.tokens,
});
```

## Health And Version

```ts theme={null}
const health = await tensormesh.health.get();
const version = await tensormesh.version.get();

console.log({ health, version });
```

The serverless `models`, `health`, and `version` endpoints can be called without an inference API key. Generation, Responses API, tokenize, and detokenize requests require an API key.
