# Claude Code

URL: https://bridge.wekoya.tech/docs/claude-code
Updated: 2026-12-05

> Run Claude Code on Bridge: set ANTHROPIC_BASE_URL and your Bridge key, pick Claude Sonnet, Opus, Haiku or any model with tool calling, and pay from your naira balance.

Claude Code runs on Bridge, paid from your naira balance, with Claude or any other Bridge model that can call tools. Bridge answers Anthropic's Messages API at `POST /v1/messages`, which is what Claude Code speaks, so nothing else needs installing. Point it at Bridge with two settings, choose its model with a third, and start it as usual.
macOS and Linux. The address has no `/v1` on the end: Claude Code adds `/v1/messages` itself.

```
export ANTHROPIC_BASE_URL=https://wekoya-api.wekoya.tech
export ANTHROPIC_AUTH_TOKEN=wk_live_...
export ANTHROPIC_MODEL=claude-sonnet-5-5
claude
```
Windows (PowerShell).

```
$env:ANTHROPIC_BASE_URL = "https://wekoya-api.wekoya.tech"
$env:ANTHROPIC_AUTH_TOKEN = "wk_live_..."
$env:ANTHROPIC_MODEL = "claude-sonnet-5-5"
claude
```
For every session. Put the same settings in `~/.claude/settings.json` (on Windows, `%USERPROFILE%\.claude\settings.json`). Keep the key out of a project's own `.claude/settings.json`: that file is shared with everyone who clones the repository.

```
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://wekoya-api.wekoya.tech",
    "ANTHROPIC_AUTH_TOKEN": "wk_live_...",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
  }
}
```

#### Choosing the model

- Left alone, Claude Code starts on `claude-opus-5-5`, the most capable Claude model and the most expensive. `ANTHROPIC_MODEL` picks another: `claude-sonnet-5-5` for everyday work, `claude-haiku-5-5` for quick jobs. Switch during a session with `/model`.
- Claude Code also uses a small model for background work such as titles and summaries. `ANTHROPIC_DEFAULT_HAIKU_MODEL` sets it.
- Any Bridge model with tool calling works, not only Claude: `ANTHROPIC_MODEL=deepseek-v4.1-flash` costs a fraction of Claude's price. For a model Claude Code does not know, it assumes a 1,000,000-token context window; if the model's is smaller (see the [models page](https://bridge.wekoya.tech/models)), set `CLAUDE_CODE_MAX_CONTEXT_TOKENS` to it so Claude Code compacts in time.
- To see Bridge's Claude models in the `/model` picker, also set `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1`.

#### What it costs
Every Claude Code request carries its own instructions and tool list, about 17,000 tokens. The first request of a session pays for them in full; after that they are read from the [prompt cache](https://bridge.wekoya.tech/docs/prompt-caching) at about a tenth of the input price, so a long session costs far less per step than its first one. The model you choose makes the biggest difference: see each model's price on the [models page](https://bridge.wekoya.tech/models).

#### What works, and what does not

- Reading and editing files, running commands, subagents, pictures, thinking, web search and web fetch. Web search runs on [Bridge's search](https://bridge.wekoya.tech/docs/search) and is billed per search, like `POST /v1/search`.
- `ANTHROPIC_API_KEY` works too (Claude Code sends it as `x-api-key`), but Claude Code asks you once before using it. `ANTHROPIC_AUTH_TOKEN` takes effect straight away.
- When your balance runs low, Claude Code shows the reason: "API Error: 402 Your balance is too low…". Top up and carry on; the session is kept.
- Features tied to a claude.ai subscription, such as Remote Control, are not available through Bridge. Nor are Anthropic's code execution tool and MCP servers sent inside a request; add MCP servers to Claude Code itself instead.

#### Anthropic's SDKs
The same endpoint works with Anthropic's own SDKs: set the base URL to Bridge and use your Bridge key. Text, streaming, tools, pictures, PDFs and thinking all work. Nothing is stored, and errors come back in Anthropic's format, with Bridge's message.

```
from anthropic import Anthropic

client = Anthropic(base_url="https://wekoya-api.wekoya.tech", api_key="wk_live_...")
message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Write a one-line welcome for a Lagos bakery."}],
)
print(message.content[0].text)
```
More: [Claude Code with Bridge](https://bridge.wekoya.tech/guides/claude-code), [Claude Code with DeepSeek and other models](https://bridge.wekoya.tech/guides/claude-code-with-deepseek), [the ways to pay for Claude Code in Nigeria](https://bridge.wekoya.tech/guides/claude-code-in-nigeria) and [Claude Code vs Codex](https://bridge.wekoya.tech/guides/claude-code-vs-codex).
