An API for everyoneUser guide
Website ↗
User guideTool setup

Claude Code

This is Claude Code, not the Claude chat website. Configure the local CLI with a Messages endpoint, or use CC Switch for a graphical setup.

Have these three details ready

With your app already installed, open Self-service on this website and sign in. Create or view your own API key, copy the API address shown there, and copy an exact model ID from Models and pricing. A website homepage, account password or marketing name is not a substitute. Check both account balance and key allowance.

API_HOST, YOUR_API_KEY and YOUR_MODEL_ID below are placeholders: replace each before use. Follow this article on whether to keep /v1; do not append /chat/completions or /responses. Examples do not connect automatically or contain your key.

1. Confirm model and format

Confirm that the platform currently offers Anthropic Messages for your chosen Claude model. A Chat Completions or Responses URL cannot be substituted directly.

2. Open personal settings

Open ~/.claude/settings.json on macOS/Linux or %USERPROFILE%\.claude\settings.json on Windows. Merge the example env entries, retaining valid JSON and unrelated settings. Do not put a personal key in shared project settings.

3. Fill in address, key and model

ANTHROPIC_BASE_URL is the Messages root. For an address https://API_HOST/v1, this example uses https://API_HOST; preserve any additional platform-specific path as instructed. The client appends /v1/messages. Fill ANTHROPIC_AUTH_TOKEN with your platform key and ANTHROPIC_MODEL with a Messages-compatible model ID.

Field diagram · not an app screenshot
ANTHROPIC_BASE_URL
https://API_HOST
ANTHROPIC_AUTH_TOKEN
YOUR_API_KEY
ANTHROPIC_MODEL
YOUR_MODEL_ID
API format
Anthropic Messages
Configuration example

Keep a copy of your current file first. Update matching entries rather than adding duplicates, and preserve unrelated settings. Do not share a configuration or screenshot containing a real key.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://API_HOST",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "YOUR_MODEL_ID"
  }
}

4. Start and inspect the active setup

Run claude in the test folder. Use /status to check the address and credential source, then /model to confirm the model. If the old subscription or service is active, check personal settings, environment variables and CC Switch before replacing anything.

5. Choose thinking effort

For a supported Claude model, inspect effort options in /model, or use /effort in versions offering it. Missing controls call for checking the model, version and gateway support; Harness capability checkboxes do not apply here.

Check 1: receive a reply

Create an empty test folder, choose it as the workspace and start a new chat. Confirm the new provider and model are selected, then send the prompt below. A normal reply without an error confirms basic connectivity, not every agent feature. Tests incur normal API usage.

Reply only: Connection successful.

Expected: the app displays “Connection successful.” If you see a login page, an error or endless loading, use the checks below before sending again.

Check 2: read a real file

In that test folder, use a text editor to create hello.txt containing “API connection test 27”. Save it, then send the prompt below. If permission is requested, allow reading only this test folder.

Use the file-reading tool to open hello.txt in the current workspace and tell me its contents. Do not change any files.

Expected: a visible tool execution reading hello.txt, followed by an answer containing API connection test 27. A text answer alone is not evidence of a tool call. You may remove the test folder afterwards.

Troubleshoot by symptom

401 / Invalid API key

Check that the address and complete key belong to the same service and that the key is active. Never send support a full key.

404 / model not found

Check /v1, the exact model ID and the API format. A listed model is not a guarantee of support for every format.

429 / quota / balance

Check balance, key allowance and request rate; follow the returned error. More thinking effort cannot fix a quota problem.

Chat works but files cannot be read

Check model tool support, workspace permissions and the tool execution error.

No effort selector

Check capability declarations, the model and client version. Thinking support does not necessarily include adjustable effort.

Official references and scope

Configuration checked on 2026-11-08. Menus may change with updates; use these official references to verify details. Use the current connection information provided by this platform.