Knowledge Base Sections ▾

Tools

OpenCode + Gonka AI - free AI for code

OpenCode - an open-source AI coding assistant that works directly in the terminal. No subscriptions, no vendor lock-in. Supports autocompletion, code generation, refactoring, and explanations - all through an OpenAI-compatible API.

Unlike proprietary tools (GitHub Copilot, Cursor Pro), OpenCode is completely free and open. The only expense is the API provider for LLM. With JoinGonka Gateway, this expense is reduced to $0.30 per month.

Setup takes 30 seconds via environment variables.

Step 1: Get API Key

Standard procedure for all tools:

  1. Register at gate.joingonka.ai/register.
  2. A bonus of 10M free tokens is automatically credited.
  3. Create an API key (format jg-xxx) in Dashboard.

The same key works with Cursor, Cline, Continue.dev and any OpenAI-compatible client.

Step 2: Configure OpenCode

OpenCode uses standard OpenAI environment variables. Add to ~/.bashrc or ~/.zshrc:

export OPENAI_BASE_URL=https://gate.joingonka.ai/v1
export OPENAI_API_KEY=jg-your-key

Restart your terminal: source ~/.bashrc

Or run OpenCode with inline variables:

OPENAI_BASE_URL=https://gate.joingonka.ai/v1 \
  OPENAI_API_KEY=jg-your-key \
  opencode

Model selection: if OpenCode asks for a model, specify Qwen/Qwen3-235B-A22B-Instruct-2507-FP8.

Verification: Run opencode and ask it to write a function. If a response comes, the setup is complete.

Why OpenCode + Gonka is the best combination

Three reasons why the OpenCode + Gonka combination is optimal for developers:

  • Completely open-source: Both OpenCode and Gonka Network are open source. No vendor lock-in, no proprietary dependencies. You control every component.
  • Cost: $0.001/1M tokens — thousands of times cheaper than any proprietary analog. GitHub Copilot costs $19-39/month with limits. OpenCode + Gonka — unlimited, for pennies.
  • Privacy: Your code is not sent to Microsoft/OpenAI/Anthropic servers. Requests go through a decentralized network — there is no single repository for your data.

OpenCode supports many LLM providers, but with JoinGonka Gateway, you get the optimal balance of price, quality, and privacy. Alternative terminal tools: Claude Code, Aider.

Model parameters: context window – 128K tokens, maximum response length – 2048 tokens. Specifications: HuggingFace.

OpenCode + Gonka = completely open-source AI coding assistant for $0.30/month. No subscriptions, no vendor lock-in, no sending code to corporate servers. 10M free tokens to start.

Want to learn more?

Explore other sections or start earning GNK right now.

Get 10M free tokens →