# Claude Code (/en/docs/cookbook/coding-agents/claude-code)











Connect Praxis to Claude Code and drive the terminal coding agent with your own key—editing code, running commands, answering questions.

Every step lists its **expected result**: follow along yourself, or hand this page to an AI assistant that can operate your computer and let it do the install, setup, and verification for you.

## What you'll accomplish [#what-youll-accomplish]

* Call Praxis models with the `claude` command in your terminal
* Done when: `claude -p "…"` returns a model reply
* Time needed: **3 minutes** (excluding the Node.js install)
* Protocol: Anthropic-compatible (Claude Code's native protocol)

## Prerequisites [#prerequisites]

Confirm each item before you start:

* **A Praxis API key** (starting with `sk-praxis-`). If you don't have one, create it at [Console → API Keys](https://console.deepraxis.ai/keys&#x29;: click "Create Key"—the name is required, the validity defaults to 90 days (or pick permanent)—then copy it right away. You can also re-copy the full key any time from the "Copy" action on its row in the key list. New accounts ship with **$1 of free credit**. See [Quickstart](/en/docs/developers/model/quickstart) for the full flow.
* **Node.js 18 or newer.** Check with `node --version`; install the LTS from [nodejs.org](https://nodejs.org) if needed.
* **Install Claude Code**:

  ```bash
  npm install -g @anthropic-ai/claude-code
  ```

  Expected: `claude --version` prints a version number (this page follows 2.1.211).

## Configure [#configure]

**Step 1: write the config file**

Create `~/.claude/settings.json` (on native Windows, `%USERPROFILE%\.claude\settings.json`):

```json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.deepraxis.com/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "sk-praxis-your-key"
  },
  "model": "deepseek-flash"
}
```

Two notes:

* `model` **must be set**. Claude Code's default model is not in the Praxis catalog, and the first conversation fails with "Model does not exist" without it. `deepseek-flash` is the platform's sample model—cheap, fast, good at both Chinese and English; any other catalog model works too.
* The key goes into `ANTHROPIC_AUTH_TOKEN`, not `ANTHROPIC_API_KEY`—the latter is for talking to Anthropic directly and does nothing behind a gateway.

Expected: saving the file takes effect immediately; nothing to restart.

<img alt="The actual ~/.claude/settings.json shown in a terminal" src="__img0" />

**Step 2 (optional): a one-off session without persisting the key**

When you'd rather not write the key to disk, use inline environment variables:

```bash
ANTHROPIC_BASE_URL=https://api.deepraxis.com/anthropic \
ANTHROPIC_AUTH_TOKEN=sk-praxis-your-key \
claude --model deepseek-flash -p "Hello"
```

Expected: a reply arrives. On Windows PowerShell, skip this and use Step 1's config file instead. When run inside a code project, the reply may pick up that project's `AGENTS.md` / `CLAUDE.md` context—that's normal.

## Verify [#verify]

```bash
claude -p "Reply with exactly: connected"
```

Expected: the terminal prints the reply—**a reply means you're connected**.

<img alt="A real claude -p run in a terminal" src="__img1" />

Drop `-p` for the full interactive coding-agent workspace. The very first launch asks you to pick a UI theme first:

<img alt="The Claude Code interactive welcome screen" src="__img2" />

You can also verify from the command line. Set the variable first (copying the curl verbatim without it yields a 401):

```bash
export PRAXIS_API_KEY=sk-praxis-your-key
```

The commands below are written for macOS / Linux / WSL (bash). On Windows PowerShell: a reply from `claude -p` above already means you're connected—feel free to skip; for the CLI route, run `$env:PRAXIS_API_KEY="your-key"` first and join the curl into a single line (dropping the trailing `\`).

```bash
curl https://api.deepraxis.com/anthropic/v1/messages \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-flash", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello"}]}'
```

Expected: HTTP 200 means you're connected. The block in `content` with `type` `text` is the reply—`deepseek-flash` is a reasoning model, so a `thinking` block may come first; that's normal.

Finally, check [Console → Usage & Billing](https://console.deepraxis.ai/usage): the call you just made is already on the books—every call is billed and traceable.

<img alt="The console Usage & Billing page: deepseek-flash calls itemized" src="__img3" />

## FAQ [#faq]

| Symptom                                                                                                   | Cause                                                                             | Fix                                                                                                                                                                                                    |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| First conversation fails with "issue with the selected model … may not exist" or `Model … does not exist` | No `model` set, so Claude Code used its default—which isn't in the Praxis catalog | Add `"model"` in `settings.json` (or pass `--model`) with a [catalog](https://console.deepraxis.ai/models) model such as `deepseek-flash`                                                              |
| Invalid token / 401                                                                                       | Key copied incompletely or revoked; or written into `ANTHROPIC_API_KEY`           | Copy it again in full (mind the `sk-praxis-` prefix); make sure it's in `ANTHROPIC_AUTH_TOKEN`; if it still fails, create a new one in the [console](https://console.deepraxis.ai/keys)                |
| `Connection closed mid-response`                                                                          | Transient network drop                                                            | Just retry                                                                                                                                                                                             |
| `npm install -g` fails with a permission error                                                            | The global npm directory isn't writable                                           | Set a user-level prefix, or use the official installer (command below); both detailed in the [npm guide](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) |

Official installer:

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

## Advanced [#advanced]

* **How much did that session cost?** [Console → Usage & Billing](https://console.deepraxis.ai/usage)—pay per call, no idle fees
* **Switch models**: change `model` in `settings.json` (or use `--model` ad hoc). Fill `claude-opus-5` for the Claude flagship; `deepseek-v4-flash` is a pinned snapshot while `deepseek-flash` always points at the latest Flash generation
* **Use it in a project**: run `claude` inside your code directory—it reads files, edits code, and runs commands, asking for your confirmation before each action

## Related recipes [#related-recipes]

* [Codex](/en/docs/cookbook/coding-agents/codex) · [Cline](/en/docs/cookbook/coding-agents/cline) · [OpenCode](/en/docs/cookbook/coding-agents/opencode)
* Prefer a GUI? See [Cherry Studio](/en/docs/cookbook/chat-clients/cherry-studio) · [Chatbox](/en/docs/cookbook/chat-clients/chatbox)
