Claude Code CLI
Configure Claude Code with Arcflow as an Anthropic Messages API base URL.
Claude Code can talk to an API base URL that implements the Anthropic Messages surface. Arcflow exposes the expected endpoints:
POST /v1/messagesPOST /v1/messages/count_tokensGET /v1/models
Recommended: ~/.claude/settings.json
The simplest setup is to edit ~/.claude/settings.json with the base URL, key,
and the model ids you want Claude Code to use:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-...",
"ANTHROPIC_BASE_URL": "https://api.tryarcflow.com",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
"ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-5",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"hasCompletedOnboarding": true
}The base URL is the bare host https://api.tryarcflow.com; the Anthropic SDK
appends /v1/messages. Then run claude.
Alternative: environment variables
You can also configure Claude Code with environment variables instead of the settings file.
1. Export the base URL
export ANTHROPIC_BASE_URL="https://api.tryarcflow.com"2. Export the Arcflow key
export ANTHROPIC_AUTH_TOKEN="sk-..."Claude Code sends this value as Authorization: Bearer ....
3. Enable model discovery
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1Discovery queries /v1/models at startup. If the model you want does not appear
in the picker, launch Claude Code with the model explicitly:
ANTHROPIC_MODEL="claude-sonnet-4-6" claude4. Run Claude Code
claudeDirect HTTP test
curl https://api.tryarcflow.com/v1/messages \
-H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 128,
"messages": [{ "role": "user", "content": "Reply with ok" }]
}'Source: Claude Code base URL configuration.