# Claude Code

Source: https://cicora.ai/en/docs/claude-code

## Use the Claude Code connection values

Create a platform key in the cabinet. Claude Code uses the Anthropic Messages format and adds `/v1/messages` itself, so its settings are:

| Setting                | Value                                                          |
| ---------------------- | -------------------------------------------------------------- |
| `ANTHROPIC_BASE_URL`   | `https://api.cicora.ai` without `/v1`                          |
| `ANTHROPIC_AUTH_TOKEN` | Your cicora.ai platform key                                    |
| Model                  | A supported canonical ID or published alias, passed explicitly |

Remove a stale `ANTHROPIC_API_KEY`: it uses a different authentication path and can override or interfere with `ANTHROPIC_AUTH_TOKEN`.

## Install the configuration

The installer updates an existing Claude Code settings file; it does not install Claude Code. If the file already exists, both installers create a timestamped backup before changing it.




macOS and Linux



Windows PowerShell




```bash
export CICORA_API_KEY="sk_..."

curl -fsSL https://app.cicora.ai/install/claude-code.sh | \
  CICORA_API_KEY="$CICORA_API_KEY" sh
```



```powershell
$env:CICORA_API_KEY = "sk_..."
irm https://app.cicora.ai/install/claude-code.ps1 | iex
```



The installer writes `ANTHROPIC_BASE_URL`, `ANTHROPIC_AUTH_TOKEN`, and an empty `ANTHROPIC_API_KEY`. Review the printed settings path and backup path after it finishes.

## Configure manually

Back up an existing `~/.claude/settings.json`. Prepare the directory and an absent file without overwriting existing settings, restrict the file to its owner, and clear the stale shell variable:

```bash
export CICORA_API_KEY="sk_..."

umask 077
mkdir -p ~/.claude
if [ ! -e ~/.claude/settings.json ]; then
  printf '%s\n' '{}' > ~/.claude/settings.json
fi
chmod 600 ~/.claude/settings.json
unset ANTHROPIC_API_KEY
```

Open the file in an editor. If it has no top-level `env` object, add one; otherwise keep its existing fields. Remove the `ANTHROPIC_API_KEY` property from `env` and merge this fragment without deleting any unrelated settings:

```json
{
  "ANTHROPIC_AUTH_TOKEN": "paste-value-from-CICORA_API_KEY",
  "ANTHROPIC_BASE_URL": "https://api.cicora.ai"
}
```

After saving, enforce owner-only access again:

```bash
chmod 600 ~/.claude/settings.json
```

For a temporary setup in the current shell only:

```bash
export CICORA_API_KEY="sk_..."
export ANTHROPIC_BASE_URL="https://api.cicora.ai"
export ANTHROPIC_AUTH_TOKEN="$CICORA_API_KEY"
unset ANTHROPIC_API_KEY
```

**The settings file contains the platform key**


Protect Claude Code settings and installer backups because they contain the key. Do not commit them. If either file is exposed, revoke the key in the cabinet and create a replacement.


## Verify the endpoint before Claude Code

This direct request checks the base, key, Messages path, header, and default alias independently of the CLI:

```bash
export CICORA_API_KEY="sk_..."

curl --fail-with-body --silent --show-error https://api.cicora.ai/v1/messages \
  -H "Authorization: Bearer $CICORA_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 64,
    "messages": [
      { "role": "user", "content": "Reply with ok" }
    ]
  }'
```

The response text is in `content[0].text`. If this fails, fix the endpoint or key before diagnosing Claude Code.

## Select and verify a model explicitly

The current Messages contract accepts supported canonical IDs such as `anthropic/claude-sonnet-4.6` and published aliases such as `claude-sonnet-4-6`. It also accepts supported regular chat IDs and their configured aliases; see [Anthropic Messages](/en/docs/anthropic-messages) for current examples.

Claude Code's picker may not list a third-party catalog. Pass the model explicitly:

```bash
claude --model claude-sonnet-4-6
```

For another model, copy a current ID or published alias from model discovery instead of guessing one. A **public error code** is the client-facing code returned by the API; when the Anthropic-shaped envelope has no separate code, record `error.type`, HTTP status, message, endpoint, time, and masked key prefix.

See [API authentication](/en/docs/authentication) for rotation and safe diagnostics. The complete request and response contract is in [Anthropic Messages](/en/docs/anthropic-messages).

## Troubleshooting


**Claude Code calls /v1/v1/messages or returns 404**


Set `ANTHROPIC_BASE_URL` to exactly `https://api.cicora.ai` without `/v1`. Claude Code appends `/v1/messages`; the complete path is used only for the direct curl check.


**The direct request works but Claude Code returns an authentication error**


Confirm Claude Code received `ANTHROPIC_AUTH_TOKEN` and remove `ANTHROPIC_API_KEY` from the shell and persistent settings. Restart the CLI after changing environment variables.


**The model picker does not show the intended model**


This does not prove the API lacks the model. Copy a current canonical ID or published alias from discovery and pass it with `claude --model`.


**The installer changed settings unexpectedly**


Stop Claude Code, inspect the settings path printed by the installer, and compare it with the timestamped backup. Restore the backup if needed, then merge only the three documented environment values.


**The alias worked before but is now rejected**


Remove stale model values and copy an ID currently returned by model discovery. Aliases are published configuration, not a rule that can be recreated by stripping punctuation.

## FAQ

### What is cicora.ai?

cicora.ai is a multi-model AI workspace and compatible API for chat, text, images, video, coding tools, and teams. Start with the [overview](/en.md), [documentation](/en/docs.md), or [model catalog](/en/models.md).

### How is usage billed?

Confirmed usage is charged in USD from the active workspace's prepaid balance. Use the live catalog for current model prices and the [usage guide](/en/docs/usage-costs.md) for settlement details.

### Which protocols and integrations are available?

Documentation covers OpenAI-compatible Chat Completions and Responses, Anthropic Messages, image interfaces, Claude Code, OpenCode, and Codex CLI. Compatibility does not imply support for every upstream parameter.

### Which sources are authoritative and current?

For model IDs, availability, capabilities, limits, and prices, use the [live catalog](/en/models.md). For API behavior, use the matching [documentation page](/en/docs.md). Never include API keys, private workspace data, or preview URLs in public documents.
