Skip to content

Anthropic Provider

The Anthropic provider connects Swixter to Anthropic’s Claude API using the Responses API protocol.

Terminal window
swixter claude create my-anthropic-profile \
--provider anthropic \
--api-key sk-ant-api03-... \
--model claude-sonnet-4-6
FieldValue
Provider IDanthropic
Wire APIresponses
Default Base URLhttps://api.anthropic.com
Env KeyANTHROPIC_API_KEY

Get your API key from the Anthropic Console.

The API key is written to ~/.claude/settings.json as an environment variable when you run swixter claude apply.

You can specify a default model when creating or editing a profile:

Terminal window
swixter claude edit my-anthropic-profile -m claude-opus-4-6

Supported model fields for Claude Code:

Model FieldEnvironment Variable
ModelANTHROPIC_MODEL
Default HaikuANTHROPIC_DEFAULT_HAIKU_MODEL
Default OpusANTHROPIC_DEFAULT_OPUS_MODEL
Default SonnetANTHROPIC_DEFAULT_SONNET_MODEL

Claude Code profiles support an optional auth token:

Terminal window
swixter claude create profile-with-token \
--provider anthropic \
--api-key sk-ant-... \
--auth-token your-auth-token

This sets ANTHROPIC_AUTH_TOKEN in the Claude Code config.

  • Compatible with Claude Code
  • Not compatible with Codex (requires wire_api: "chat")

For Codex, use a wire_api: "chat" provider like Ollama or a custom OpenAI-compatible provider.