Claude Code

Run Claude Code cheaper.
Same harness.

Claude Code is the agent. LayerX1 is the backend. Four environment variables — or one command — and you keep the loop on GLM, MiniMax, Kimi, DeepSeek or Claude, on a $5 coding plan instead of a $100 Max seat.

Free $2 credit · no card · npx layerx1 setup --tool claude-code

Setup[01/04]

Point Claude Code here. Keep the harness.

Claude Code speaks the Anthropic Messages dialect. LayerX1 serves that dialect natively — no local proxy, no Claude Code Router. The base URL is the origin only; Claude Code appends /v1/messages itself.

ONE COMMAND
npx layerx1 setup --tool claude-code
OR FOUR VARIABLES
export ANTHROPIC_BASE_URL=https://api.layerx1.com
export ANTHROPIC_AUTH_TOKEN=lx1_your_key
export ANTHROPIC_MODEL=lx1-glm-5.2
export ANTHROPIC_SMALL_FAST_MODEL=lx1-glm-4.7-flash
  1. 01

    Get a key

    Sign up at layerx1.com. The free plan includes a small credit. Paid coding plans start at $5/month.

  2. 02

    Point Claude Code at LayerX1

    Run npx layerx1 setup --tool claude-code, or set ANTHROPIC_BASE_URL to https://api.layerx1.com and ANTHROPIC_AUTH_TOKEN to your lx1_ key.

  3. 03

    Pick a model

    Set ANTHROPIC_MODEL to a catalog id such as lx1-glm-5.2 or lx1-sonnet-4.6. Set ANTHROPIC_SMALL_FAST_MODEL to a cheap flash model for helper calls.

  4. 04

    Start Claude Code

    Run claude. If you were logged into Anthropic before, run /logout once so the gateway token is used.

Full Claude Code guide →
Against the shelf[02/04]

The buyer is already shopping coding plans.

GLM Lite, MiniMax Token Plan, OpenCode Go, ClinePass, OpenRouter — that is the shelf. LayerX1 sits on it as the one key that is not locked to a single lab or a single harness.

PlanEntryWhat you actually get
Anthropic Max$100–$200/moClaude only. Seat + usage windows. Hits a wall mid-sprint.
GLM / MiniMax coding plan$10–$18/moOne lab's models. Fine until you want Claude, GPT, or a second harness.
OpenRouterPAYG + feeEvery model, no installer, no monthly pool. A supermarket, not a coding plan.
LayerX1$5 / $19 / $49One key. Claude Code native. GLM, MiniMax, Kimi, DeepSeek, Qwen, Claude, GPT. Sixteen harnesses.
Coding plans compared →
Models that hold a loop[03/04]

Pick the model. Keep the agent.

Swap ANTHROPIC_MODEL any time. Helper calls stay on a flash model so the expensive id only spends on the turns that need it.

lx1-glm-5.2

Daily driver — GLM in Claude Code, coding-plan price.

lx1-minimax-m3

Long context, high tokens/sec agent loops.

lx1-kimi-k2.7-code

Moonshot coding weights, same harness.

lx1-sonnet-4.6

Anthropic when the turn is actually hard.

Still signed into Anthropic from before? Run /logout once so Claude Code picks up ANTHROPIC_AUTH_TOKEN. 404s usually mean you appended /v1 to the base URL. Codex CLI uses the same key on the OpenAI dialect.

Frequently asked[04/04]
Can I use Claude Code without an Anthropic Max plan?
Yes. Claude Code is the harness. LayerX1 is the backend. Set ANTHROPIC_BASE_URL to https://api.layerx1.com and ANTHROPIC_AUTH_TOKEN to your lx1_ key. You are billed by LayerX1, not Anthropic.
Does GLM work inside Claude Code?
Yes. Point Claude Code at LayerX1 and set ANTHROPIC_MODEL to a GLM id from the catalog (for example lx1-glm-5.2). The Messages dialect is native — no local proxy.
How is this cheaper than Claude Code Max?
Anthropic Max is a seat on Anthropic's own models. A LayerX1 coding plan is a monthly usage pool at public list rates across GLM, MiniMax, Kimi, DeepSeek, Qwen and flagship models, from $5. Heavy agent loops cost less on the open coding models; you still have Claude when a turn needs it.
Is this the same as OpenRouter for Claude Code?
OpenRouter is a pay-as-you-go supermarket of hundreds of models. LayerX1 is a coding plan: a flat monthly pool, an installer that writes Claude Code / Codex / Cline config, and an API built for hour-long agent loops. Same ANTHROPIC_BASE_URL trick, different product.
What do I set for ANTHROPIC_BASE_URL?
https://api.layerx1.com — the origin only. Do not append /v1. Claude Code adds /v1/messages itself. Put the key in ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY.
Put your agent on inference built for the work

Your agent stays the same.
Its inference gets better.

$export ANTHROPIC_BASE_URL=https://api.layerx1.com

Start free · no card · Starter from $5/mo