# `max chat`

Send messages to Max on the Public API (Bearer = per-user API key; base URL from env, profile, or --base-url — see `max --help`)

```bash
max chat [options] [command]
```

**Options**

| Flag | Description | Default |
|  --- | --- | --- |
| `--profile <name>` | Max profile: uses the per-user API key and Public API base URL from the Frontline CLI profile of the same name (`max config-path` shows the Max-only store). |  |
| `--base-url <url>` | Advanced: override Public API base URL for this run |  |
| `--api-base-url <url>` | Deprecated alias for --base-url (Public API root) |  |
| `--api-key <key>` | Override per-user API key for this run |  |
| `--debug` | Show debug information |  |
| `--timeout <seconds>` | Polling timeout in seconds | `60` |


## `max chat send`

POST /public/v1/max/conversations/message. Default stdout: one-line JSON body as returned by the API. `--pretty`: assistant text from `data`. `--json`: POST response only, no poll.

```bash
max chat send [options] <message...>
```

**Options**

| Flag | Description | Default |
|  --- | --- | --- |
| `--new` | Start a new conversation |  |
| `--conversation <id>` | Conversation id to use |  |
| `--profile <name>` | Max profile: uses the per-user API key and Public API base URL from the Frontline CLI profile of the same name (`max config-path` shows the Max-only store). |  |
| `--base-url <url>` | Advanced: override Public API base URL for this run |  |
| `--api-base-url <url>` | Deprecated alias for --base-url (Public API root, …/public/v1) |  |
| `--api-key <key>` | Override per-user API key for this run |  |
| `--json` | Print only the POST response JSON (no polling) |  |
| `--pretty` | Print assistant message text from `data` |  |
| `--debug` | Show debug information |  |
| `--no-wait` | Do not poll for assistant reply |  |
| `--timeout <seconds>` | Polling timeout in seconds | `60` |


## `max chat repl`

Interactive readline session; each line is sent like `max chat send` (same API URL rules as `max --help`).

```bash
max chat repl [options]
```

**Options**

| Flag | Description | Default |
|  --- | --- | --- |
| `--profile <name>` | Max profile: uses the per-user API key and Public API base URL from the Frontline CLI profile of the same name (`max config-path` shows the Max-only store). |  |
| `--base-url <url>` | Advanced: override Public API base URL for this run |  |
| `--api-base-url <url>` | Deprecated alias for --base-url (Public API root) |  |
| `--api-key <key>` | Override per-user API key for this run |  |
| `--debug` | Show debug information |  |
| `--timeout <seconds>` | Polling timeout in seconds | `60` |