> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://platform.bctrl.ai/_mcp/server.

# AI Commands

> Discover managed models and manage BYOK AI credentials.

Discover managed models and manage BYOK AI credentials.

Output formatting flags (`--json`, `--jq`, and `--template`) are documented once in [Output Formatting](/cli/output) and are omitted from the tables below.

## `bctrl ai models list`

List AI models

```bash
bctrl ai models list [flags]
```

| Flag                    | Description                    |
| ----------------------- | ------------------------------ |
| `--provider <provider>` | Filter by provider             |
| `--status <status>`     | Filter by support status       |
| `--managed <value>`     | Filter by managed availability |

## `bctrl ai credentials list`

List AI credentials

```bash
bctrl ai credentials list [flags]
```

| Flag                    | Description        |
| ----------------------- | ------------------ |
| `--provider <provider>` | Filter by provider |
| `--name <name>`         | Filter by name     |
| `--status <status>`     | Filter by status   |

## `bctrl ai credentials get`

Get an AI credential

```bash
bctrl ai credentials get <credentialId>
```

## `bctrl ai credentials create`

Create an AI credential

```bash
bctrl ai credentials create [flags]
```

| Flag                      | Description                                                  |
| ------------------------- | ------------------------------------------------------------ |
| `--name <name>`           | Credential name                                              |
| `--provider <provider>`   | Provider key                                                 |
| `--api-key <key>`         | Provider API key                                             |
| `--status <status>`       | Credential status                                            |
| `--default-model <model>` | Default model                                                |
| `--base-url <url>`        | Custom provider base URL                                     |
| `--subaccount-id <id>`    | Use this Subaccount account context with an Organization key |

## `bctrl ai credentials patch`

Update an AI credential

```bash
bctrl ai credentials patch <credentialId> [flags]
```

| Flag                      | Description              |
| ------------------------- | ------------------------ |
| `--name <name>`           | Credential name          |
| `--provider <provider>`   | Provider key             |
| `--api-key <key>`         | Provider API key         |
| `--status <status>`       | Credential status        |
| `--default-model <model>` | Default model            |
| `--base-url <url>`        | Custom provider base URL |

## `bctrl ai credentials test`

Test an AI credential

```bash
bctrl ai credentials test <credentialId>
```

## `bctrl ai credentials delete`

Delete an AI credential

```bash
bctrl ai credentials delete <credentialId> [flags]
```

| Flag        | Description      |
| ----------- | ---------------- |
| `-y, --yes` | Confirm deletion |