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

# Provider Configuration

> Configure the Tensormesh AI SDK provider for serverless inference.

The Tensormesh AI SDK provider targets Tensormesh serverless inference.
The default provider instance uses `https://serverless.tensormesh.ai/v1`.

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

const model = tensormesh("deepseek-ai/DeepSeek-V4-Flash");
```

## Explicit Provider

Use `createTensormesh` when you want to pass settings explicitly, such as a
custom `fetch`, custom headers, or an API key value from your own secret store.

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

const tensormesh = createTensormesh({
  apiKey: process.env.TENSORMESH_INFERENCE_API_KEY,
});
```

Supported settings:

* `apiKey`: inference API key used as the bearer token. Defaults to `TENSORMESH_INFERENCE_API_KEY`.
* `headers`: additional headers for each request.
* `fetch`: custom fetch implementation.

Importing or creating a provider instance does not require an API key. A key is
required when you make an authenticated generation, tokenize, detokenize, or
Responses API request.

## Public Helpers

The serverless `models`, `health`, and `version` helpers can be called without
an inference API key:

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

const models = await tensormesh.models.list();
const health = await tensormesh.health.get();
const version = await tensormesh.version.get();
```
