> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use AIsa in Claude Code

> Point Claude Code at AIsa's Anthropic-compatible endpoint with two environment variables.

Claude Code speaks the Anthropic Messages API natively, and AIsa exposes an Anthropic-compatible endpoint — so the whole setup is one base URL and one API key.

AIsa endpoint for Anthropic clients (no `/v1` — Claude Code appends `/v1/messages` itself):

```txt theme={null}
https://api.aisa.one
```

## Prerequisites

Before you start, make sure you have:

* An AIsa API key ([console.aisa.one/api-keys](https://console.aisa.one/api-keys))
* A terminal on macOS, Linux, or Windows WSL2

## 1. Install Claude Code

```bash theme={null}
npm install -g @anthropic-ai/claude-code
```

Verify the installation:

```bash theme={null}
claude --version
```

## 2. Point Claude Code at AIsa

Export these variables in your shell (add them to `~/.zshrc` or `~/.bashrc` to persist):

```bash theme={null}
export ANTHROPIC_BASE_URL="https://api.aisa.one"
export ANTHROPIC_AUTH_TOKEN="sk-aisa-..."
export ANTHROPIC_MODEL="claude-opus-4-8"
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-5-20251001"
```

<Tip>
  Prefer a settings file over shell exports? Put the same values in `~/.claude/settings.json` instead:

  ```json theme={null}
  {
    "env": {
      "ANTHROPIC_BASE_URL": "https://api.aisa.one",
      "ANTHROPIC_AUTH_TOKEN": "sk-aisa-...",
      "ANTHROPIC_MODEL": "claude-opus-4-8",
      "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-5-20251001"
    }
  }
  ```
</Tip>

`ANTHROPIC_MODEL` is the main model; `ANTHROPIC_SMALL_FAST_MODEL` handles lightweight background tasks. Any Claude model from the [catalog](/docs/guides/models) works — pass the exact model ID.

## 3. Start Claude Code and connect AIsa capabilities

```bash theme={null}
claude
```

If Claude Code asks how to log in, choose the API-key / auth-token path — the `ANTHROPIC_AUTH_TOKEN` you exported is picked up automatically.

Then paste this prompt:

```txt theme={null}
Read https://aisa.one/docs/agent-quickstart.md and help me safely connect, configure, and use AIsa's APIs, Skills, and LLMs in this agent environment.
```

Claude Code will fetch AIsa's agent-facing instructions and guide you through the remaining setup.

Try:

```txt theme={null}
Use AIsa capabilities to search the web and summarize the latest information about Claude Code.
```

## Quick reference

| Item                         | Value                                                                                                                                                    |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ANTHROPIC_BASE_URL`         | `https://api.aisa.one` (no `/v1`)                                                                                                                        |
| `ANTHROPIC_AUTH_TOKEN`       | Your AIsa API key (`sk-aisa-...`)                                                                                                                        |
| `ANTHROPIC_MODEL`            | `claude-opus-4-8` (or any Claude model ID)                                                                                                               |
| `ANTHROPIC_SMALL_FAST_MODEL` | `claude-haiku-4-5-20251001`                                                                                                                              |
| Capability setup prompt      | `Read https://aisa.one/docs/agent-quickstart.md and help me safely connect, configure, and use AIsa's APIs, Skills, and LLMs in this agent environment.` |

## Troubleshooting

| Problem                                     | Fix                                                                                |
| ------------------------------------------- | ---------------------------------------------------------------------------------- |
| 404 or "not found" errors                   | Remove `/v1` from `ANTHROPIC_BASE_URL` — Claude Code appends `/v1/messages` itself |
| Authentication error (401)                  | Re-check `ANTHROPIC_AUTH_TOKEN` in the [dashboard](https://console.aisa.one)       |
| Env vars not taking effect                  | Restart the terminal, or confirm with `echo $ANTHROPIC_BASE_URL`                   |
| Model not found                             | Use an exact Claude model ID from the [catalog](/docs/guides/models)                    |
| Claude Code does not know AIsa capabilities | Paste the capability setup prompt above into the session                           |

## Related

<CardGroup cols={3}>
  <Card title="Use AIsa in Codex" icon="terminal" href="/docs/guides/tutorials/use-aisa-in-codex">
    Configure OpenAI's Codex CLI with the same AIsa key.
  </Card>

  <Card title="Authentication" icon="key" href="/docs/guides/authentication">
    API key creation, rotation, and storage best practices.
  </Card>

  <Card title="Model Catalog" icon="list" href="/docs/guides/models">
    Browse Claude model IDs, context windows, and pricing.
  </Card>
</CardGroup>
