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

# tm infer models

> Call GET /v1/models on serverless inference.

## When To Use This

Use `tm infer models` when you want to enumerate models from the serverless host.

On the default Tensormesh serverless host, this route works without an inference API key.

## Usage

```sh theme={null}
tm infer models [OPTIONS]
```

## Examples

### List models from the default serverless host.

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

## Options

| Name         | Type                 | Required | Default        | Details                                                    |
| ------------ | -------------------- | -------- | -------------- | ---------------------------------------------------------- |
| `--surface`  | `choice[serverless]` | no       | `"serverless"` | Inference surface to target.                               |
| `--api-key`  | `text`               | no       |                | Inference API key (Authorization: Bearer ...).             |
| `--base-url` | `text`               | no       |                | Override the base URL for the selected surface.            |
| `--timeout`  | `float`              | no       |                | HTTP connect timeout in seconds for the inference request. |

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

## Caveats

* The returned `id` value is the model string to pass back as `model` in serverless requests.

## Related Commands

* [`tm billing pricing serverless list`](/cli/reference/billing/pricing/serverless/list)
* [`tm infer chat`](/cli/reference/infer/chat)
* [`tm infer completions`](/cli/reference/infer/completions)

## Parent Command

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