Skip to main content
Get stock Claude Code CLI driving open-weight models against Tensormesh in 5 minutes. No config file, no proxy — just three environment variables. Every model listed below supports the full Claude Code flow today (chat + tool use); MiniMaxAI/MiniMax-M2.5 is the recommended default.

Sign up / Log in

Create your Tensormesh account with Google or GitHub.

Get an API key

Generate an ak-... key under Profile → API keys.

Install Claude Code

npm install -g @anthropic-ai/claude-code — verified against 2.1.145+.

Supported models

Matrix of Claude-Code-ready models on Tensormesh serverless.

Get support

TL;DR

Three environment variables, no config file:
That’s the full setup — no config.toml, no PATH change, no proxy.
Running claude --bare every time gets old. Persist it as an alias so plain claude Just Works:
For one-shot prompts (claude -p "..."), the --bare flag isn’t strictly required — the Anthropic SDK uses ANTHROPIC_API_KEY in non-interactive mode. But keeping it consistent is cleaner.

Prerequisites

  • Claude Code CLI installed via npm install -g @anthropic-ai/claude-code. Verified against 2.1.145 (chat + tool use end-to-end); forward-compatible with later versions barring upstream Claude Code breaking changes.
  • A Tensormesh account with an API key (ak-...). Sign up, then visit Profile → API keys.
  • macOS or Linux, bash or zsh. Windows binaries ship in recent Claude Code releases but aren’t currently tested by Tensormesh.
Tensormesh accepts Claude Code’s native x-api-key header. You do not need to use claude login or the Anthropic OAuth flow — those are for Anthropic-hosted models. Setting ANTHROPIC_API_KEY is sufficient.
You do not need to run any local infrastructure. Tensormesh handles the full Anthropic Messages API server-side, so stock claude pointed at serverless.tensormesh.ai is the complete setup.

Supported models

GET /v1/models reflects what’s currently available — Tensormesh hides any model that’s temporarily cold. If you see fewer models than the table lists, retry after 30–60 seconds; the first request to a cold model warms it up.
For non-Claude-Code clients (Python SDK, curl, custom apps), every model in the table works fine via /v1/messages and /v1/chat/completions as well. The matrix above is calibrated specifically for stock Claude Code CLI.

Switching models

Claude Code defaults to a Claude-family model if --model is omitted. To use a Tensormesh model, pass --model on the command line. Per-invocation overrides don’t change any defaults — they only affect the current run.

Per-invocation (no env edit)

Set a default for every session

The cleanest way to pin a Tensormesh model as your everyday default is ANTHROPIC_MODEL, persisted alongside the other two env vars:
After reloading your shell, claude (no --model) uses the model above. Per-invocation --model still overrides.

Optional: shell aliases for frequent switching

If you switch models often, add aliases to your ~/.zshrc (zsh) or ~/.bashrc (bash):
Reload your shell, then run cc-coder from any directory to start a Claude Code session against that model.

Setup

The three steps from the TL;DR, with explanation.
1

Install Claude Code CLI

This installs the claude command to your global node_modules/bin. Verify with claude --version.
2

Point Claude Code at Tensormesh

Set two environment variables in your shell (add them to ~/.zshrc or ~/.bashrc to persist):
ANTHROPIC_BASE_URL redirects the Anthropic SDK away from api.anthropic.com to Tensormesh. ANTHROPIC_API_KEY is sent as the x-api-key header on every request (Anthropic-SDK convention).
Add both lines to ~/.zshrc or ~/.bashrc, then source the file or open a new terminal.
Don’t have a key yet? Generate one in your profile.
3

(Optional) pin a default model

Without ANTHROPIC_MODEL, Claude Code defaults to a Claude-family model, which won’t resolve on Tensormesh. Either pass --model on every invocation, or set the default once:
Persist alongside the other two env vars.

Usage

The --bare requirement for the TUI is a property of Claude Code’s auth precedence — when a custom ANTHROPIC_BASE_URL is set, Claude Code’s interactive mode still tries OAuth/keychain first by default. --bare switches it to strict env-var auth. The alias in the TL;DR tip is the simplest way to make this transparent for daily use.

Slash commands in TUI

Inside an interactive claude session, type / to bring up the command picker (autocomplete). The set of commands varies slightly between Claude Code versions, so the picker is the source of truth. To exit a session cleanly, type /exit or press Ctrl-D twice.

Permission and sandbox modes

By default, Claude Code asks for confirmation before each file write, shell command, and tool call. Three modes:
--bare is the recommended mode when calling Claude Code from automated pipelines — fewer side effects, more deterministic behavior, no surprise interactive prompts, and a single explicit auth path. Combine with -p for one-shot prompts.
  • MiniMaxAI/MiniMax-M2.5 is the most reliable all-purpose default for Claude Code on Tensormesh. It handles the full agentic loop (read → edit → run shell → iterate) and stays consistent across long multi-turn sessions (verified through 10+ turns of stateful workflow without drift).
  • For pure code generation or editing (e.g. write a function, refactor a file, translate snippets), Qwen/Qwen3-Coder-30B-A3B-Instruct (256K) or Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 are coding-tuned alternatives. They’re strong at code-generation work but can be more brittle than MiniMax on composite tool-orchestration prompts (e.g. “create file X, then run Y, then summarize”) — if you hit unexpected output, retry with a simpler one-step prompt or fall back to MiniMax.
  • For very long contexts, deepseek-ai/DeepSeek-V4-Flash (1M tokens) handles inputs that won’t fit elsewhere.
  • Stay in the default (prompted) permission mode for code you don’t fully trust. Reach for --dangerously-skip-permissions only inside a sandboxed environment with no internet access, per Anthropic’s own guidance.

Troubleshooting

When a request fails, the meaningful error message is the most recent line printed by Claude Code. Match that line against the Symptom column below.
Still stuck? Email saas-support@tensormesh.ai with the meaningful error line and the output of claude --version.

Rollback / uninstall

To remove Tensormesh from your Claude Code setup:
  1. Unset the three environment variables from your shell, and remove them from ~/.zshrc / ~/.bashrc:
  2. Claude Code will resume targeting Anthropic’s hosted API on its next invocation.
All actions reverse the setup steps above. No config files to clean up.