Skip to main content
Version: Next

amctl llm-provider

Manage LLM providers in an organization — create, list, and delete connections to upstream LLM APIs.

amctl llm-provider [command]

LLM providers are organization-level resources that represent connections to upstream LLM APIs (OpenAI, Anthropic, AWS Bedrock, …). Once created, a provider is exposed through an AI Gateway and can be attached to agents in any project in the organization — see amctl agent create. The command group is also available under the llm-providers alias.

Subcommands

CommandPurpose
createCreate an LLM provider
listList LLM providers in an organization
deleteDelete an LLM provider

Options inherited from parent commands

NameDescription
--orgOverride the active organization.
--jsonOutput as JSON envelopes.

amctl llm-provider create

Create an LLM provider in the active organization from a built-in or custom template.

amctl llm-provider create <id> [flags]

The endpoint URL and auth scheme are inherited from the chosen --template; override them with --upstream-url / --auth-type / --auth-header only when needed. Supply the provider credential with --api-key-stdin (recommended) or --api-key.

Arguments

NameDescription
<id>Resource handle for the provider. Must be 1–255 characters and contain only letters, digits, -, or _. Used to reference the provider elsewhere (for example, amctl agent create --llm-provider <id>).

Examples

# OpenAI provider, API key read from stdin (recommended — keeps it out of shell history)
echo "$OPENAI_API_KEY" | amctl llm-provider create prod-openai \
--display-name "Production OpenAI" \
--template openai \
--api-key-stdin

# Anthropic provider that overrides the template's upstream endpoint
amctl llm-provider create prod-anthropic \
--display-name "Production Anthropic" \
--template anthropic \
--upstream-url https://api.anthropic.com \
--api-key-stdin < anthropic-key.txt

# Deploy the provider to specific AI Gateways at creation time
echo "$OPENAI_API_KEY" | amctl llm-provider create shared-openai \
--display-name "Shared OpenAI" \
--template openai \
--api-key-stdin \
--gateways 550e8400-e29b-41d4-a716-446655440000

# Provider whose template needs no credential
amctl llm-provider create internal-proxy \
--display-name "Internal Proxy" \
--template openai \
--upstream-url https://llm.internal.acme \
--auth-type none

Options

NameTypeDefaultDescription
--display-namestringrequiredHuman-readable display name.
--templatestringrequiredProvider template handle, e.g. openai, anthropic, mistralai. Tab-completes the live set for your org.
--versionstringv1Provider version.
--contextstring/API context path. Must start with / and must not end with / (except the root path).
--descriptionstring(none)Provider description.
--upstream-urlstring(template default)Override the template's upstream endpoint URL.
--auth-typestringapi-keyUpstream auth type: api-key, basic, bearer, or none.
--auth-headerstring(template default)Override the template's auth header name.
--api-keystring(none)Provider API key. Leaks into shell history — prefer --api-key-stdin.
--api-key-stdinboolfalseRead the provider API key from stdin.
--gatewaysstrings(none)AI Gateway UUIDs to deploy the provider to. Repeatable, or comma-separated.

Built-in templates

--template accepts these built-in handles:

anthropic, awsbedrock, azure-openai, azureai-foundry, gemini, mistralai, openai

Tab completion on --template lists the live set — built-in handles plus any custom templates registered for your organization.

Template inheritance and credentials

  • A provider inherits the template's upstream URL, auth scheme, and auth header. The upstream block is sent only when you supply --upstream-url, --auth-type, or --auth-header, or a credential — otherwise creation defers entirely to the template.
  • --api-key and --api-key-stdin are mutually exclusive.
  • An API key cannot be combined with --auth-type none.
  • A provider must be associated with at least one AI Gateway to be callable by agents. Pass --gateways at creation, or associate gateways later from the console (see Register an LLM Service Provider).
tip

Reading the key from stdin keeps it out of your shell history and process list. --api-key-stdin accepts a piped value (echo "$KEY" | …) or a redirected file (… < key.txt).


amctl llm-provider list

List the LLM providers in the active organization.

amctl llm-provider list

Returns up to 50 providers. The default text output is a table with id, name, template, status, and created columns; --json returns the raw response.

Example

amctl llm-provider list

# As JSON for downstream parsing
amctl llm-provider list --json | jq '.data.providers[].id'

amctl llm-provider delete

Delete an LLM provider. Asks for confirmation unless --yes is set; when stdin is not a terminal, --yes is required.

amctl llm-provider delete <provider> [flags]

Arguments

NameDescription
<provider>Provider handle (id) or UUID. Tab-completes existing providers in the org.

Options

NameShortTypeDefaultDescription
--yes-yboolfalseSkip the confirmation prompt.

Examples

# Delete by handle, with confirmation
amctl llm-provider delete prod-openai

# Delete without prompting (also required in non-interactive shells)
amctl llm-provider delete prod-openai --yes

See Also