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 + Gonka AI - free AI for code
- 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 + Gonka AI — 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
- 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
pi.tag
Pi + JoinGonka Gateway — terminal agent on cheap inference
Pi is a minimalist terminal coding agent, one of the fastest-growing open harnesses of 2026. Providers are described declaratively in ~/.pi/agent/models.json, and any endpoint that speaks OpenAI Completions or Anthropic Messages works — meaning JoinGonka Gateway connects via both paths. Gonka decentralized network models cost hundreds of times less than vendor card prices, and the starting 10M tokens are free.
Fast path: installer
The quickest option is our installer:
npx @joingonka/setup --tool piIt will configure a provider with current network models in ~/.pi/agent/models.json, set the default model in ~/.pi/agent/settings.json (without overwriting existing choices), and perform a live request to verify that the gateway accepts the key and model. The key is stored as a literal in the config with 0600 permissions — there is no need to export an environment variable.
Manual configuration: provider in models.json
Get a jg-… key upon registration and add the provider to ~/.pi/agent/models.json:
baseUrl | https://gate.joingonka.ai/v1 |
api | openai-completions |
apiKey | your jg-… key as a literal. Pi understands $VAR/${VAR} links and !command, but the literal works without an exported variable — keep the file with 0600 permissions |
models | array: id, name, contextWindow, maxTokens |
Correct values for network models: deepseek-ai/DeepSeek-V4-Flash-0731 — contextWindow 380000, maxTokens 32768; moonshotai/Kimi-K2.6 and MiniMaxAI/MiniMax-M2.7 — maxTokens 8192. Pi defaults (128000/16384) do not match actual network limits, so set both fields explicitly. The default model resides in a DIFFERENT file — ~/.pi/agent/settings.json, fields defaultProvider and defaultModel. Verification: pi --list-models should show the added models.
Anthropic path as an alternative
The gateway also provides Anthropic Messages: a provider with api: "anthropic-messages" and baseUrl: "https://gate.joingonka.ai" — without the /v1/messages path, the client will append it itself. For daily work, the OpenAI path is sufficient; the Anthropic option is useful if your Pi extensions are tuned for the Messages format.
Safety disclaimer
Pi does not have a full permission layer by default: the agent executes commands in the terminal without the step-by-step confirmation found in heavier harnesses. Run it in a sandbox — a container or a separate user account — especially for autonomous multi-step tasks. This is a property of Pi itself, not the gateway.
Which model to choose and pricing
All three network models support tool calling and streaming. For long sessions and large repositories, use DeepSeek V4 Flash (longest network context, output up to 32768). Kimi K2.6 is strong in multi-step agent work, while MiniMax M2.7 is a versatile option. There is a single rate; real-time pricing is available in the gateway pricing list.