InsightWorker Logo
  • contact@verticalserve.com
Docs / LLM providers / Anthropic API (direct)

Anthropic API (direct)

The simplest way to use Claude — direct API key from console.anthropic.com. Use this when you don't have AWS Bedrock available and want to call Claude directly.

For enterprise / regulated workloads, prefer Bedrock (data stays in your AWS account) or Vertex AI Anthropic if you're already on GCP.

Configuration

~/.insightworker/.env:

LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
AGENT_MODEL=claude-sonnet-4-5

Get an API key

  1. Visit console.anthropic.com/settings/keys
  2. Sign in / create an account
  3. Create Key — name it insightworker
  4. Copy the key (starts with sk-ant-)

Recommended models

Use caseModel
General apps, tool useclaude-sonnet-4-5
Heavy reasoning, complex translationsclaude-sonnet-4-5 (1M context variant)
Cheap classificationclaude-haiku-4-5

Where data goes

Anthropic's standard API: prompts go to Anthropic's cloud, no training on customer data by default for API customers, retention policy at anthropic.com/legal/aup.

If your security review requires prompts stay in a specific cloud tenant, use Bedrock (AWS) or Vertex AI (GCP) — same models, your tenant.

Context windows

ModelContext
Sonnet 4.5 / 4.6200k
Opus 4.1200k
Opus 4.7 (1M variant)1M
Haiku 4.5200k

Common gotchas

SymptomCauseFix
401 UnauthorizedBad keyRegenerate at console.anthropic.com
429 rate-limitedHit your usage tier ceilingWait, or upgrade tier in the Anthropic console
400 input too longHit the context windowUse a longer-context model or trim history

See also


Source: docs/providers/anthropic-direct.md in the public repo. Open a PR with corrections.