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

# Tensormesh Python SDK

> Overview, install guidance, and the main client surfaces for the Tensormesh Python SDK.

The Tensormesh Python SDK is the main application-integration surface for Tensormesh.

Use it when you want to:

* call serverless inference endpoints from Python, including chat completions, `models`, `completions`, `responses`, `tokenize`, `detokenize`, `health`, and `version`
* work with Tensormesh control-plane resources such as models, users, billing, and support
* choose between synchronous and asynchronous clients without changing the overall API shape

The SDK ships in the `tensormesh` Python distribution. The `tm` CLI ships in the same distribution, but the SDK is the better starting point when you are building application code or services.

The public inference surface exposes `chat.completions`, `models`, `completions`, `responses`, `tokenize`, `detokenize`, `health`, and `version`. On the default public serverless host, `models`, `health`, and `version` also work without an inference API key. Embeddings and audio endpoints are not currently exposed on this SDK surface.

For the shortest first-success path, set up serverless inference with an inference API key.

## Prerequisites

Python `3.12` or newer.

## Install

```sh theme={null}
pip install tensormesh
```

## Main Client Surfaces

* `Tensormesh`: synchronous client for scripts, notebooks, and request/response applications
* `AsyncTensormesh`: asynchronous client for services and async application stacks

Both clients expose the same top-level namespaces:

* `client.inference.serverless`
* `client.control_plane`

The inference namespace exposes `chat.completions`, `models`, `completions`, `responses`, `tokenize`, `detokenize`, `health`, and `version`.

## Choose A Guide

* [Getting Started](/sdk/guides/getting-started)
* [Auth And Config](/sdk/guides/auth-and-config)
* [Inference](/sdk/guides/inference)
* [Migration From OpenAI And Fireworks](/sdk/guides/migration-from-openai-fireworks)
* [Control Plane](/sdk/guides/control-plane)

## Related Reference

* [Raw Inference API Reference](/api-reference)
* [`tm billing pricing serverless list`](/cli/reference/billing/pricing/serverless/list)
* [CLI Guides](/cli)

Use the **Control Plane API** tab in the docs navigation for generated management API reference.
