How-To: Adding Anthropic as an LLM Provider to Smarter
Goal
Register Anthropic as an LLM provider on your organization’s Smarter platform so that Claude models are available to llm_clients, the Prompt Engineer Workbench, and developer tooling such as Claude Code.
By the end of this tutorial you will have two verified Claude models — Claude Opus and Claude Sonnet — ready for use across the platform.
Prerequisites
Before you begin, confirm that you have:
Smarter v0.11.0 or later, deployed and accessible.
An administrator-level Smarter account with permission to manage providers.
The Smarter CLI installed and authenticated. See Smarter CLI for installation instructions.
A text editor. VS Code with the Smarter YAML extension provides autocomplete and validation for manifest files.
Note
You do not need an Anthropic API key on your personal machine. The key is configured once at the platform level and stored securely in Smarter. Individual developers never handle provider credentials directly.
Setup
Smarter supports two categories of LLM providers.
Built-in providers are pre-initialized automatically during deployment
and only require an API key in .env:
Provider |
Environment Variable |
API Key Console |
|---|---|---|
OpenAI (required) |
|
|
GoogleAI |
|
|
MetaAI |
|
Additional providers require both an API key in .env and a
Provider manifest applied via the CLI:
Provider |
Environment Variable |
API Key Console |
|---|---|---|
Anthropic |
|
|
Cohere |
|
|
Fireworks |
|
|
Mistral |
|
|
TogetherAI |
|
This tutorial walks through adding Anthropic as an additional provider.
Concept Overview
Smarter manages every resource — providers, llm_clients, plugins — through
declarative YAML files called SAM (Smarter API Manifests). This pattern
is modeled on Kubernetes: you describe the desired state in a file and
smarter apply makes it happen.
A Provider manifest has four sections:
apiVersion— alwayssmarter.sh/v1.kind— set toProvider.metadata— a unique name, human-readable description, and version.spec— the provider configuration: which backend and which model.
When you apply a manifest, Smarter registers the provider and automatically runs verification checks against the provider’s API. Once verification passes, the provider is marked active and its models become available platform-wide.
Step-by-Step
Step 1: Obtain an Anthropic API Key
Sign in at console.anthropic.com.
Navigate to Settings > API Keys > Create Key.
Give the key a descriptive name (e.g.
smarter-napl-prod).Copy the key immediately — it is displayed only once.
Danger
Never commit API keys to version control or share them in plain text.
The key will be stored in the Smarter .env file on the server, which
should be excluded from source control.
Step 2: Add the Key to the Smarter Environment
Open the .env file at the root of your Smarter deployment and add:
SMARTER_ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Restart the application so it picks up the new credential:
make restart
Step 3: Generate a Manifest Template
Use the CLI to print a valid starter manifest:
smarter manifest provider
Review the output to understand the expected structure before writing your own manifests.
Step 4: Create the Provider Manifests
Create one manifest per model. We will register two Claude models so the team can evaluate cost-versus-quality trade-offs in the Workbench.
Create a file named anthropic-opus.yaml:
apiVersion: smarter.sh/v1
kind: Provider
metadata:
name: anthropic-opus
description: Anthropic Claude Opus 4 - high-capability model
version: 1.0.0
spec:
provider:
name: anthropic
model: claude-opus-4-5
Create a second file named anthropic-sonnet.yaml:
apiVersion: smarter.sh/v1
kind: Provider
metadata:
name: anthropic-sonnet
description: Anthropic Claude Sonnet 4 - balanced speed and quality
version: 1.0.0
spec:
provider:
name: anthropic
model: claude-sonnet-4-6
Note
Model identifiers are case-sensitive and must match the names published by Anthropic exactly. For the complete manifest field reference, see Smarter API Manifests (SAM).
Step 5: Apply the Manifests
smarter apply -f anthropic-opus.yaml
smarter apply -f anthropic-sonnet.yaml
Smarter registers each provider and begins asynchronous verification checks.
Step 6: Verify the Providers
smarter describe provider anthropic-opus
smarter describe provider anthropic-sonnet
Look for a status section showing verified: true in each output.
If the status shows pending, wait 30 seconds and run the command again —
verification checks are asynchronous.
You can also confirm via the web console: open the Providers page in the
left sidebar. Both anthropic-opus and anthropic-sonnet should appear
with an active status indicator.
Proof of Concept
Run the following commands to confirm end-to-end success:
smarter describe provider anthropic-opus
smarter describe provider anthropic-sonnet
Expected output for each provider (abbreviated):
apiVersion: smarter.sh/v1
kind: Provider
metadata:
name: anthropic-opus
description: Anthropic Claude Opus 4 - high-capability model
version: 1.0.0
spec:
provider:
name: anthropic
model: claude-opus-4-5
status:
verified: true
active: true
Both providers showing verified: true and active: true confirms that
Smarter has established a live connection to the Anthropic API and the models
are ready for use in llm_clients and the Workbench.
Tip
With both providers active, you can create two llm_clients — one backed by Opus and one by Sonnet — and compare their responses to the same prompt in the Workbench. This is a practical way to evaluate which model best fits each use case before rolling it out to the programming team.
Troubleshooting
- “API key not found” on startup
The
SMARTER_ANTHROPIC_API_KEYvariable is missing from.envor the application was not restarted after adding it. Runmake restart.- Provider status shows “verification failed”
The API key is invalid, expired, or has been revoked. Generate a new key at console.anthropic.com and update the
.envfile.- “Model not found” when applying a manifest
The
modelvalue does not match the provider’s published identifier. Double-check the spelling and casing. Anthropic model names use lowercase with hyphens (e.g.claude-opus-4-5).- YAML validation errors
Indentation is almost always the cause. Run
smarter manifest providerto compare your file against a known-good template. YAML requires spaces, not tabs.- Provider appears in CLI but not in the web console
Refresh the browser. If it still does not appear, confirm that your Smarter account has administrator privileges.
- “billing_not_active” or rate limit errors
Your Anthropic account does not have billing configured, or the API key belongs to a free-tier account that has exhausted its quota. Add a payment method at console.anthropic.com/settings/billing.
- API key starts with ``sk-ant-oat01-``
OAuth tokens (
sk-ant-oat01-) are not valid for direct API calls. Ensure the key starts withsk-ant-api03-. Generate a standard API key from the Anthropic console.
See also
Smarter Provider — Provider technical reference
Smarter API Manifests (SAM) — SAM manifest field reference
API Reference — Provider REST API