
# tdx providers

Manage provider credentials.

Manage the credentials the gateway uses to call providers.

Every command also takes the [global flags](/cli/reference#global-flags) and reads the [environment variables](/cli/reference#environment-variables) that the command reference lists once.

## Commands

| Command | Description | Type |
|---|---|---|
| [tdx providers keys](/cli/reference/providers#tdx-providers-keys) | Manage provider credential bindings. | Group |
| [tdx providers keys list](/cli/reference/providers#tdx-providers-keys-list) | List provider credential binding names. | Read |
| [tdx providers keys set](/cli/reference/providers#tdx-providers-keys-set) | Set a provider credential from a file or stdin. | Write |
| [tdx providers keys remove](/cli/reference/providers#tdx-providers-keys-remove) | Remove a provider credential binding. | Write |

## tdx providers keys

Manage provider credential bindings.

List, set and remove the gateway's provider bindings by name. Provider credentials stay hidden.

## tdx providers keys list

List provider credential binding names.

**Reads**

Read binding names, sources and public provider settings. Lists every value the compiled catalogue binds, as the init wizard asks for them: each provider's key, a companion its signing profile requires (an AWS access key id), a Bedrock API key it accepts instead, and each setting, set or not; each can be set by name with providers keys set. Credential values stay hidden. See [Masked read output](/cli/reference#masked-read-output).

```bash
# GET /control/keys
tdx providers keys list [flags]
```

**Output fields** (inside `data`)

| Field | Type | Description |
|---|---|---|
| `bindings` | public-binding[] | Binding names, source kinds, what the catalogue binds each as (key, companion, bearer-token or slot) and optional public setting with label and value. |

## tdx providers keys set

Set a provider credential from a file or stdin.

**Writes**

Read the credential from a protected owner-only file, bounded redirected stdin, or an explicitly named environment variable. Each credential is limited to 8192 UTF-8 bytes. A credential holds no whitespace unless it is one JSON object, such as a service-account key, which may hold whitespace inside but none around it. When using --setting or --field-env, the gateway validates the catalogue configuration and saves all supplied fields together. Only public settings can be supplied literally. Dry-run reads no credential inputs or profiles, sends no request and creates nothing; its requested preview is not authoritative. See [Checked request values](/cli/reference#checked-request-values) and [Masked write output](/cli/reference#masked-write-output).

```bash
# PUT /control/keys/:name
tdx providers keys set --name <string> [flags]
```

**Required flags**

| Flag | Type | Default | Description |
|---|---|---|---|
| `--name` | string |  | Credential binding environment-variable name. |

**Optional flags**

| Flag | Type | Default | Description |
|---|---|---|---|
| `--value-file` | path |  | Read a credential only from this file. |
| `--value-stdin` | boolean | `false` | Read a credential from standard input. |
| `--value-env` | string |  | Read a credential from this explicitly named environment variable; never a literal value. |
| `--setting` | string |  | Set a public provider setting as BINDING=VALUE. Repeat for multiple settings. Repeatable. |
| `--field-env` | string |  | Read a companion credential as BINDING=VARIABLE from the named environment variable. Repeat for multiple companions. Repeatable. |

**Constraints**

- Exactly one of `--value-file`, `--value-stdin`, `--value-env`

**Output fields** (inside `data`)

| Field | Type | Description |
|---|---|---|
| `binding` | binding-outcome | Public binding name and set status only. |
| `preview` | write-preview\|null | Requested change, unchecked by the gateway; null after execution. |

**Examples**

Save a Bedrock API key and its region together:

```bash
tdx providers keys set --name AWS_BEDROCK_API_KEY --value-env BEDROCK_KEY --setting AWS_BEDROCK_REGION=us-west-2
```

## tdx providers keys remove

Remove a provider credential binding.

**Writes**

Remove a stored binding by name. Ambient gateway environment credentials may still resolve; removal does not revoke a provider credential. Dry-run reads no secret files or profiles, makes no request and creates nothing; the gateway has not checked the preview. See [Checked request values](/cli/reference#checked-request-values) and [Masked write output](/cli/reference#masked-write-output).

```bash
# DELETE /control/keys/:name
tdx providers keys remove --name <string> [flags]
```

**Required flags**

| Flag | Type | Default | Description |
|---|---|---|---|
| `--name` | string |  | Credential binding environment-variable name. |

**Output fields** (inside `data`)

| Field | Type | Description |
|---|---|---|
| `removed` | string | Removed binding name, not a credential. |
| `preview` | write-preview\|null | Requested change, unchecked by the gateway; null after execution. |
