Skip to main content

Anthropic Integration

Connect Claude models to NudgeBee's LLM Server, or route your organisation's own traffic to Anthropic through the AI Gateway.

Overview

Anthropic provides direct API access to the Claude model family. NudgeBee supports Anthropic as a first-class LLM provider in two places:

  • LLM Server — the models that power NuBi, investigations, RCA generation and the pre-built agents.
  • AI Gateway — a passthrough route (/anthropic/v1/messages) so tools in your organisation can reach Anthropic through the gateway and pick up its metering, quotas and routing.

If you reach Claude through AWS rather than directly, use AWS Bedrock instead — same models, different credentials and endpoint.

Prerequisites

  • An Anthropic account with API access at console.anthropic.com
  • An API key (they begin sk-ant-)
  • Billing configured

Generating an API key

  1. Sign in at console.anthropic.com.
  2. Go to API Keys and create a new key.
  3. Give it a descriptive name and copy it — the value is shown once.
  4. Store it securely; it is a bearer credential for your account's spend.

Integrating with LLM Server

LLM_PROVIDER=anthropic
LLM_MODEL_NAME=<model id> # e.g. claude-opus-5
LLM_PROVIDER_API_KEY=<your sk-ant-… key>
LLM_PROVIDER_API_ENDPOINT= # optional, for a proxy or gateway in front of Anthropic
LLM_MODEL_FALLBACKS= # optional, comma-separated model ids to fall back to

Extended thinking

LLM_ANTHROPIC_THINKING_ENABLED=true   # default: false

Claude models can reason before answering. Turning this on generally improves multi-step investigation quality and costs more tokens per call. Leave it off for routine work and turn it on if you find investigations stopping short of a root cause.

Model ids

ModelModel idContext
Claude Opus 5claude-opus-51M
Claude Opus 4.8claude-opus-4-81M
Claude Opus 4.7claude-opus-4-71M
Claude Opus 4.6claude-opus-4-61M
Claude Sonnet 5claude-sonnet-51M
Claude Sonnet 4.6claude-sonnet-4-61M
Claude Haiku 4.5claude-haiku-4-5200K

Model ids are complete as written — do not append a date suffix.

Which to pick. Opus for investigation and RCA quality, Sonnet for a cheaper default on high-volume work, Haiku for classification and routing where latency matters more than depth. Current pricing is on Anthropic's pricing page.

Embeddings and RAG Server

Anthropic does not serve embeddings

There is no EMBEDDINGS_PROVIDER=anthropic. RAG Server must use a different provider for embeddings, even when LLM Server is on Anthropic — a perfectly normal split.

Supported embeddings providers are bedrock (the default), openai, azure, googleai, huggingface, ollama and sagemaker. Configure one of those:

EMBEDDINGS_PROVIDER=openai
EMBEDDINGS_MODEL_ID=<embedding model>
EMBEDDINGS_PROVIDER_API_KEY=<key for that provider>

See OpenAI, AWS Bedrock or Ollama for the provider you choose.

Using Anthropic through the AI Gateway

The gateway recognises anthropic as a provider and exposes an Anthropic-shaped route, so a tool already speaking the Messages API can be pointed at the gateway with only a base-URL change.

Configure the gateway's Anthropic credential with GATEWAY_ANTHROPIC_API_KEY, or supply a tenant key from Admin → AI & Tools → Gateway.

Once it is routed through the gateway you get per-user cost attribution, quotas and central model remapping — see AI Gateway. Point a tool at a tier alias rather than a concrete model id and you can change models later without touching the tool.


Troubleshooting

401 authentication_error

The key is wrong, revoked, or has whitespace around it. Anthropic keys start with sk-ant-. Re-copy the key from the console; it is shown only at creation, so if you no longer have it, issue a new one.

404 not_found_error naming the model

The model id is wrong or your organisation does not have access to it. Check the id against the table above — a date suffix appended to a current model id produces exactly this error.

429 rate_limit_error

You have hit a per-minute request or token limit. Bulk log analysis and large investigations are the usual triggers. Either move to a higher tier in the Anthropic console, or set LLM_MODEL_FALLBACKS so overflow lands on another model instead of failing.

400 mentioning credit balance

Billing is not configured, or the balance is exhausted. Check Billing in the Anthropic console.

Investigations stop before reaching a root cause

Try LLM_ANTHROPIC_THINKING_ENABLED=true, and prefer an Opus model over Haiku for investigation work.