Claude Code is Anthropic's agentic command-line tool. Because Toknix natively supports the Anthropic Messages wire format, you can route Claude Code through Toknix without modifying any source code.
Prerequisites
- Node.js 18+ installed on your system.
- Claude Code CLI installed globally:bash
npm install -g @anthropic-ai/claude-code - A funded Toknix account with your
tk_live_...API key.
Configuration
Point Claude Code to the Toknix gateway by configuring two environment variables in your terminal session or shell profile (~/.zshrc or ~/.bashrc):
export ANTHROPIC_BASE_URL="https://api.toknix.in"
export ANTHROPIC_API_KEY="tk_live_your_actual_key_here"Shell Persistence
Running Claude Code
Launch the agent inside any project repository:
claudeClaude Code will authenticate against Toknix, stream responses with prompt caching, and deduct usage from your prepaid USD balance.
Cost & Efficiency Tips
Claude Code passes extensive repository maps and file histories on every turn. With Toknix automatic prompt caching, repeated turns benefit from up to 90% cost reductions on shared context.