Knowledge Base Sections ▾
Navigation
▸ Start here By rolesCategories
- Cursor + Gonka AI - cheap LLM for coding
- Claude Code + Gonka AI - LLM for the terminal
- OpenClaw + Gonka AI - affordable AI agents
- OpenCode: your own model in the terminal
- Continue.dev + Gonka AI - AI for VS Code/JetBrains
- Cline + Gonka AI - AI agent in VS Code
- Aider + Gonka AI - pair programming with AI
- LangChain + Gonka AI - AI applications for pennies
- n8n + Gonka AI - automation with cheap AI
- Open WebUI + Gonka AI - your own ChatGPT
- LibreChat + Gonka AI — open-source ChatGPT
- Hermes Agent + DeepSeek on the Gonka network — an autonomous agent for pennies
- Kilo Code + Gonka AI — AI-Agent in VS Code
- Roo Code + Gonka AI — Autonomous AI Agent in VS Code
- LlamaIndex + Gonka AI — RAG applications for pennies
- PydanticAI + Gonka — typed AI agents for pennies
- Vercel AI SDK + Gonka AI — AI applications in TypeScript for pennies
- TanStack AI + Gonka — AI applications in TypeScript for pennies
- API quick start — curl, Python, TypeScript
- JoinGonka Gateway — a full overview
- Management Keys — SaaS on Gonka
- Cheapest AI API: Provider Comparison 2026
- How to buy AI tokens and an API key: 3 methods in 2026
- Cursor Pro request limit reached — breakdown and cheaper alternative
- Claude Code is cheaper — bill breakdown and switching
- Cline is burning money — why the agent spends so much
- OpenClaw is expensive — why the agent burns through tokens and how to save
- OpenRouter: Cheap Alternative — Comparison with JoinGonka Gateway
- Best AI model for coding in 2026: comparison and prices
- Cheap alternative to GitHub Copilot without limits
- A cheap Windsurf alternative without credits or limits
- The cheapest API for AI agents in 2026
- ZCode: Cheap GLM inference instead of GLM Coding Plan
- JetBrains IDE + JoinGonka Gateway — your own endpoint instead of credits
- GitHub Copilot BYOK — own models instead of quotas
- Zed + JoinGonka Gateway — cheap inference in your editor
- Pi + JoinGonka Gateway — terminal agent on cheap inference
- Codex CLI: your own key instead of a subscription
- DeepSeek Harness: Your Own Provider via JoinGonka Gateway
- MiniMax Code: MiniMax agent with your own key via Gonka
- Warp + JoinGonka Gateway — terminal agent on your own endpoint
- Trae + JoinGonka Gateway — Gonka network models in AI-IDE
- Cherry Studio + JoinGonka Gateway — desktop AI client
- omp (Oh My Pi) + JoinGonka Gateway: an agent with model roles
- OpenHands + JoinGonka Gateway: agent on your own endpoint
- Qwen Code after the closure of qwen-oauth: working via JoinGonka Gateway
- Goose + JoinGonka Gateway: your own provider and key in the keyring
- Crush + JoinGonka Gateway: Charm agent on Gonka network models
- Zoo Code + JoinGonka Gateway: Migrating from Roo Code to Gonka models
- Kimi Code CLI: Moonshot AI agent on your key via Gonka
- Factory Droid + JoinGonka Gateway: BYOK on Gonka network models
- MiMo Code + JoinGonka Gateway: Xiaomi agent on Gonka network models
Tools
Claude Code + Gonka AI - LLM for the terminal
Claude Code is a powerful AI assistant for terminal-based development. It works with Git, the file system, runs tests, and refactors code. However, native Claude Sonnet 4.6 costs $3-15 per 1M tokens, and with active use, your weekly bill can exceed $200.
JoinGonka Gateway supports the native Anthropic API (/v1/messages) — Claude Code connects directly without a proxy. Use models like MiniMax M2.7, DeepSeek V4 Flash, and GLM-5.3 Flash via the decentralized Gonka network for $0.0069/1M tokens — hundreds of times cheaper, with comparable quality on coding tasks.
Setup takes 2 minutes: one installation command or a few environment variables.
Step 1: Get API Key
If you don't have a JoinGonka Gateway key yet:
- Sign up at gate.joingonka.ai/register.
- Get a bonus of 3M free tokens.
- Create an API key in Dashboard → API Keys.
- Copy the key (format:
jg-xxx).
One key works with any OpenAI-compatible tool: Cursor, Aider, LangChain, etc.
Step 2: Connect Claude Code
JoinGonka Gateway natively supports the Anthropic Messages API (/v1/messages) — no proxy needed.
The recommended approach is the one-command installer:
npx @joingonka/setup --tool claude-codeThis is the universal JoinGonka installer: run it without a flag — npx @joingonka/setup — and it will prompt you to pick a tool from a list. There are already 25 of them: Claude Code, Codex CLI, OpenClaw, Cursor, Cline, and others — see the full list in the package README.
The installer will ask for your API key, back up ~/.claude/settings.json, and write only its own fields into the env block, leaving the rest of your settings untouched: the gateway URL (ANTHROPIC_BASE_URL), the key (ANTHROPIC_AUTH_TOKEN), the model (ANTHROPIC_MODEL and the opus, sonnet, haiku aliases), and its real limits — CLAUDE_CODE_MAX_CONTEXT_TOKENS and CLAUDE_CODE_MAX_OUTPUT_TOKENS. The limits matter: for an unfamiliar identifier, Claude Code assumes its own context window and fails to compact the history in time, while the network's models have their own window — from 200K to 390K tokens. The file containing the key is given 600 permissions. DeepSeek V4 Flash is installed by default; use the --model minimax|deepseek|glm flag to choose another model. With the --scope local flag, settings are written to the current project's .claude/settings.local.json, and that file is added to .gitignore.
Manual setup (plan B)
Or do it manually — via environment variables:
export ANTHROPIC_BASE_URL=https://gate.joingonka.ai
export ANTHROPIC_AUTH_TOKEN=jg-your-key
export ANTHROPIC_MODEL=deepseek-ai/DeepSeek-V4-Flash-0731
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=380000
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=32768
claudeThe first two variables point Claude Code at the gateway: requests go out in the native Anthropic format, and the Gateway converts them into requests to the Gonka network and returns the response in Anthropic format. ANTHROPIC_MODEL pins the network model — without it, Claude Code will send its own claude-* identifier, and the gateway will substitute the default model. The last two declare the actual context window and response ceiling of the chosen model (requires Claude Code 2.1.223 or newer): otherwise, for an unfamiliar identifier, Claude Code assumes its own window and fails to compact the history in time. Values for other network models are in the "Working tips" section below.
What's supported:
- Streaming — the response starts displaying right away (SSE in Anthropic format:
message_start,content_block_delta,message_stop) - Tool calling — Claude Code makes heavy use of functions for working with files and commands. Native tool calling across all network models.
- System prompts — system prompts are passed through as-is
Verification: ask Claude Code any question. If a response appears, everything is working.
For Windows/PowerShell:
$env:ANTHROPIC_BASE_URL="https://gate.joingonka.ai"
$env:ANTHROPIC_AUTH_TOKEN="jg-your-key"
$env:ANTHROPIC_MODEL="deepseek-ai/DeepSeek-V4-Flash-0731"
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS="380000"
$env:CLAUDE_CODE_MAX_OUTPUT_TOKENS="32768"
claudeThe old narrow installer npx @joingonka/claude-code has been replaced by the universal @joingonka/setup and is no longer maintained — use the new one.
Cost Comparison with Anthropic
Claude Code is one of the most "resource-intensive" AI tools: it sends full file contexts, command history, and diffs. A typical session consumes 20-50M tokens.
| Provider | Model | Input/Output price per 1M | 4hr session (~30M tokens) | Month (20 work days) |
|---|---|---|---|---|
| JoinGonka | MiniMax M2.7 / DeepSeek V4 Flash / GLM-5.3 Flash | $0.0069 / $0.021 | $0.14 | $2.9 |
| Anthropic | Claude Sonnet 4.6 | $3.00 / $15.00 | $210 | $4,200 |
| OpenAI | GPT-5.5 | $5.00 / $30.00 | $300 | $6,000 |
The difference is three orders of magnitude. For $2.9 per month via JoinGonka, you get what costs $4,200+ at Anthropic. For an indie developer, this is the difference between "I can afford an AI assistant" and "I can't".
Usage Tips
A few recommendations for efficient work with Claude Code via Gonka:
- Context: MiniMax M2.7 has a 200K token context window (~100K words) — enough for most projects, DeepSeek V4 Flash has 380K, and GLM-5.3 Flash has 390K. The maximum output length via Gateway is 8192 tokens for MiniMax M2.7 and GLM-5.3 Flash, 32768 for DeepSeek V4 Flash. For long generations, you might need to split the task into parts. The current list of network models is available at
GET https://gate.joingonka.ai/v1/models. - Streaming: The Gateway supports streaming in the native Anthropic format — the response starts appearing immediately, just like with native Claude.
- Tool calling: All network models support native tool calling, which is important for Claude Code — the tool actively uses functions to work with files and commands.
- Latency: The first request may take 5-10 seconds (node cold start). Subsequent requests take 1-3 seconds.
- Other tools: JoinGonka Gateway is also compatible with the OpenAI API — Aider, OpenCode, Cursor connect via
/v1/chat/completions.
For developers who prefer other terminal tools, see also: Aider, OpenCode.