StoryClaw Docs

Configure Claude Code

Point Claude Code at StoryClaw's Anthropic Messages endpoint, either by hand or through the CC Switch GUI.

Claude Code talks to Anthropic by default. Switching it to StoryClaw takes two things: an endpoint and your API key.

If Claude Code is not installed yet, start with Install Claude Code. Create your key on the API Keys page of the console — see API Keys. Pick either option below; the result is identical.

Option A: manual setup

Set two environment variables:

# macOS / Linux — add to ~/.zshrc or ~/.bashrc to persist
export ANTHROPIC_BASE_URL="https://llm.storyclaw.com"
export ANTHROPIC_API_KEY="your-storyclaw-key"
# Windows (PowerShell) — reopen the terminal afterwards
setx ANTHROPIC_BASE_URL "https://llm.storyclaw.com"
setx ANTHROPIC_API_KEY "your-storyclaw-key"

Set ANTHROPIC_BASE_URL to the bare domain https://llm.storyclaw.com — Claude Code appends /v1/messages itself, so do not include /v1 and do not add a trailing slash.

You can also configure this per project by putting the same two values in the env field of .claude/settings.json (or ~/.claude/settings.json for a global default):

.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://llm.storyclaw.com",
    "ANTHROPIC_API_KEY": "your-storyclaw-key"
  }
}

The key sits in this file in plain text. Add a project-level .claude/settings.json to .gitignore so it never reaches your repository.

Option B: the CC Switch GUI

CC Switch is an open-source provider manager that handles the same settings through a GUI, with no JSON or environment variables to edit by hand, and makes switching between providers easy. On macOS, brew install --cask cc-switch is all it takes; other platforms are covered in CC Switch.

Add a provider

Launch CC Switch, select Claude Code at the top, then click the + button in the upper right.

Click the Claude Code tab and the + button in the upper right

In the "Add new provider" dialog, click Custom configuration, then Add.

Choose custom configuration and click Add

Fill in the settings

Find the entry you just created in the list and click the edit icon (pencil) on its right to open the "Edit provider" page.

Click the edit icon next to StoryClaw-CC

Fill in the form as below and leave everything else at its default:

FieldValueNotes
Provider nameStoryClaw-CCAnything you like; just a label
Websitehttps://storyclaw.comOptional
API KeyYour StoryClaw API keyFrom the "API Keys" page in the console
API endpointhttps://llm.storyclaw.comBare domain, no /v1, no trailing slash
API formatAnthropic Messages (native)Under "Advanced options"; leave as is
Auth fieldANTHROPIC_API_KEYLeave as is

Edit provider form

Expand Model mapping below the form and map the Sonnet and Opus tiers to StoryClaw model IDs:

TierModel requested
Sonnetclaude-sonnet-5
Opusclaude-opus-4-8

You can also click Fetch model list and pick from the dropdown arrow to the right of "Model requested". For the authoritative list of IDs, see Available models.

CC Switch writes ~/.claude/settings.json for you, so no files need editing by hand.

Enable the provider

Click Save in the lower right. Back in the list, hover the StoryClaw-CC row and click the Enable button that appears. A highlighted row means it is active.

Verify the setup

Go to a project directory and start Claude Code:

cd your-project
claude

Press Esc to skip the login prompt on first launch. Then check the status line at the top: API Usage Billing means requests are billed through the API, and the item before it is the current model.

Claude Code running successfully

If that looks right, the setup is done. Send any message; a normal reply means you are good to go.

To double-check the details, run /status in the session and look at two lines:

  • Anthropic base URL should read https://llm.storyclaw.com
  • Model is the model actually in use

Available models

Claude Code uses the /v1/messages endpoint, and StoryClaw serves Claude models only there:

Model IDNotes
claude-sonnet-5Everyday coding; faster and cheaper
claude-opus-4-8Complex work; more capable

Check the current list any time:

curl https://llm.storyclaw.com/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

Models whose api is anthropic-messages are the ones Claude Code can use. StoryClaw keeps adding newer models — update the version number in your configuration when it does.

Model IDs carry no storyclaw/ prefix. The storyclaw/... names shown in the console belong to ClawBot; sending them to the API returns Unknown model.

Choosing a model

Switch models any time with /model. To pin a default, set this environment variable:

export ANTHROPIC_MODEL="claude-sonnet-5"

Only Claude models work here. Claude Code uses /v1/messages, and StoryClaw serves Claude only on that endpoint — GPT, DeepSeek, and others will error. Use them in Codex instead.

Troubleshooting

SymptomFix
"Authentication error"Confirm the Anthropic base URL is correct and check that the API key is valid.
Connection times outConfirm the endpoint reads https://llm.storyclaw.com, with no /v1 suffix and no trailing slash.
Requests still go to AnthropicCompare the base URL with /status. Older terminal windows keep the pre-change environment variables — open a new one.
Model not foundCheck ANTHROPIC_MODEL for typos and confirm the ID appears in Available models.
CC Switch changes have no effectClaude Code reads its configuration at startup. Restart the session.

For install problems or a missing claude command, see Install Claude Code.

On this page