On this page

Anthropic Provider

Provider guide · Configuration · 简体中文

Minimal Setup

export SIGIL_ANTHROPIC_API_KEY="sk-ant-..."
sigil
config_version = 2

[agent]
connection = "anthropic-default"
model = "claude-sonnet-4-5"

[connections.anthropic-default]
label = "Anthropic"
provider = "anthropic"
protocol = "anthropic_messages"
base_url = "https://api.anthropic.com"
credential = { source = "environment", name = "SIGIL_ANTHROPIC_API_KEY" }

[connections.anthropic-default.options]
anthropic_version = "2023-06-01"
max_tokens = 4096

See anthropic.toml for a copyable file.

Authentication

The example binds this connection to SIGIL_ANTHROPIC_API_KEY. Setup and /config can save the secret to the protected credential store instead; sigil.toml then contains only an opaque stored ID. The default file mode uses the owner-only credential file without system authentication prompts.

Options And Visible Limits

anthropic_version, max_tokens, and beta_headers are provider-owned fields under [connections.anthropic-default.options]. Use beta_headers only when a known Anthropic feature requires them.

Images work only with recognized Claude model IDs and accepted dated variants. Unknown names and aliases are rejected before sending.

Verify

Run sigil doctor and confirm default=anthropic-default/claude-sonnet-4-5, endpoint, credential source, and readiness.

Common Problems

Next: Return to Providers.