HomeDocsagents/claude-code
Gateway Protocol v1 · Production Reference

Documentation

One key, two compatible wire protocols, 15 frontier models. Read the quickstart or explore the API reference.

Coding agents · Claude Code

Claude Code

Anthropic's official agentic coding tool for the terminal. Point it at the Selora gateway with two environment variables and your API key — no plugin needed.

Create an API key on the API Keys page and export it as $SELORA_API_KEY before continuing.

1

Install Claude Code

The fastest path is a single npm install. Claude Code needs Node 18 or newer.

Install
npm install -g @anthropic-ai/claude-code

Alternative: run the official installer with curl -fsSL https://claude.ai/install.sh | bash.

2

Point it at the gateway

Claude Code reads the standard Anthropic environment variables: a base URL plus your Selora key as the auth token. Setting these in a .claude/settings.json env block applies them to every project automatically.

.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.selora.lol",
    "ANTHROPIC_AUTH_TOKEN": "sk-gw-..."
  }
}
3

Run it

Launch
cd /path/to/project
claude
4

Use the 1M-token window

Every Claude model on the gateway also answers to its id with a [1m] suffix, which selects the long context window. Claude Code and Claude Desktop read it from the model list and fold it into a single model with a 1M variant, so there is nothing to configure — the long window appears as a choice on the model you already pick. From the terminal, ask for it by name.

Long context
claude --model claude-sonnet-5[1m]

The window is billed at the same rate as the standard one. A model that does not offer it answers with a clear error naming the plain id, rather than quietly serving you a smaller context.