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

# tm infer

> Inference commands for the OpenAI-compatible serverless endpoints.

## Usage

```sh theme={null}
tm infer [OPTIONS] COMMAND [ARGS]...
```

## Examples

### Inspect serverless readiness before sending a request.

```sh theme={null}
tm infer doctor
```

### Send a serverless chat-completions request with an explicit inference API key.

```sh theme={null}
tm infer chat --api-key YOUR_INFERENCE_API_KEY --model YOUR_SERVERLESS_MODEL_NAME --json '[{"role":"user","content":"Say hello."}]'
```

### List models from the default serverless host.

```sh theme={null}
tm infer models
```

## Subcommands

* [`tm infer chat`](/cli/reference/infer/chat): Call POST /v1/chat/completions on serverless inference.
* [`tm infer completions`](/cli/reference/infer/completions): Call POST /v1/completions on serverless inference.
* [`tm infer detokenize`](/cli/reference/infer/detokenize): Call POST /detokenize on serverless inference.
* [`tm infer doctor`](/cli/reference/infer/doctor): Inspect serverless inference readiness for the next request.
* [`tm infer health`](/cli/reference/infer/health): Call GET /health on serverless inference.
* [`tm infer models`](/cli/reference/infer/models): Call GET /v1/models on serverless inference.
* [`tm infer responses`](/cli/reference/infer/responses): Call POST /v1/responses on serverless inference.
* [`tm infer tokenize`](/cli/reference/infer/tokenize): Call POST /tokenize on serverless inference.
* [`tm infer version`](/cli/reference/infer/version): Call GET /version on serverless inference.

## Inherited Global Options

| Name | Type | Required | Default | Details | | | | |
| - | - | - | - | - | - | - | - | - |
| `--version`, `-V` | `boolean` | no | `false` | Show the version and exit. Boolean flag. | | | | |
| `--config` | `path` | no | `"~/.config/tensormesh/config.toml"` | Path to config TOML file | | | | |
| `--output` | \`choice\[text | json | yaml | raw | table]\` | no | `"text"` | Output format (text is human-readable; json is machine-friendly). |
| `--quiet` | `boolean` | no | `false` | Suppress non-essential output. Boolean flag. | | | | |
| `--debug` | `boolean` | no | `false` | Print debug logs to stderr (secrets redacted). Boolean flag. | | | | |
| `--ca-bundle` | `path` | no | | Path to a PEM CA bundle for TLS verification (overrides TENSORMESH\_CA\_BUNDLE). | | | | |
| `--timeout` | `float` | no | | Default HTTP timeout in seconds (overrides TENSORMESH\_TIMEOUT\_SECONDS; subcommands may override). | | | | |
| `--max-retries` | `integer` | no | | Max retries for idempotent HTTP requests on transient errors (overrides TENSORMESH\_MAX\_RETRIES; subcommands may override). | | | | |
| `--controlplane-base` | `text` | no | | Override the Control Plane base URL. | | | | |

## Parent Command

* [`tm`](/cli/reference)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.