Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 52
Glossary 12

Tools

Cursor + Gonka AI - cheap LLM for coding

Cursor is one of the most popular AI code editors of 2026. Autocomplete, refactoring, test generation, code explanation — all of it runs on LLM models. But OpenAI and Anthropic API costs can reach $30 per 1M tokens, and with active development your monthly bill easily exceeds $100.

JoinGonka Gateway is an OpenAI-compatible API to the decentralized Gonka network at $0.0069/1M tokens. That is about 720 times cheaper than OpenAI GPT-5.5. The network's models — MiniMax M2.7, DeepSeek V4 Flash and GLM-5.3 Flash, all built on the MoE architecture — deliver quality comparable to GPT-5.5 and Claude Sonnet 4.6, but for pennies.

Connecting to Cursor takes 30 seconds. Here's a step-by-step guide.

Step 1: Get JoinGonka API Key

To connect Cursor to Gonka, you need an API key from JoinGonka Gateway — our gateway to the decentralized network.

  1. Go to gate.joingonka.ai/register and create an account.
  2. Upon registration, you will automatically receive a bonus of 3M free tokens — enough for thousands of AI requests.
  3. In your Dashboard, go to the API Keys section and click Create Key.
  4. Copy the key — it starts with jg-, for example: jg-abc123def456.

The key works with any OpenAI-compatible client: Claude Code, Aider, Continue.dev, and, of course, Cursor.

Security: The key is displayed only once upon creation. Keep it in a secure place. If lost, create a new one and deactivate the old one in the Dashboard.

Step 2: Configure Cursor

Important: To use your own API key (BYOK), you need a Cursor Pro plan or higher — Cursor does not currently support overriding the key on the free tier.

Open Cursor and go to settings:

  1. Settings → Models (or Ctrl+, → Models)
  2. In the OpenAI API Key field, paste your jg-xxx key.
  3. Enable Override OpenAI Base URL and enter: https://gate.joingonka.ai/v1
  4. In the model list, add: MiniMaxAI/MiniMax-M2.7
  5. Select this model as the primary one for Chat, Composer, and Autocomplete.

Testing: open Cursor Chat (Ctrl+L) and type any prompt, for example: “Write a sorting function in Python”. If you see a response, everything is configured correctly.

Optimization tips:

  • For Chat and Composer, use the same model — MiniMax M2.7 handles code context well; for complex logic, switch to GLM-5.3 Flash, and for large repositories, use DeepSeek V4 Flash.
  • Enable streaming for faster response times — the text begins to appear immediately without waiting for full generation.
  • If you need a different response format, use the System Prompt in Cursor settings for fine-tuning.

Common errors:

  • 401 Unauthorized — verify that your key starts with jg- and is active in the Dashboard.
  • 404 Not Found — ensure the Base URL is exactly https://gate.joingonka.ai/v1 (with /v1 at the end).
  • Timeout — the first request may take 5-10 seconds due to the cold start of a node in the network. Subsequent requests will be faster.
  • Cursor's built-in model stopped responding — while the Override OpenAI Base URL toggle is on, Cursor sends all OpenAI-family requests to your endpoint, including its own built-in models. Turn off the toggle while working with Cursor models and turn it back on for network models.

Disclaimer: Chat and Agent mode are redirected to your endpoint; Cursor Tab autocomplete runs on Cursor's own models and does not go through third-party APIs — this is a limitation of Cursor itself, not the gateway.

Hint. The command npx @joingonka/setup --tool cursor will print ready-to-use values for these fields — base URL, key, model ID, and its actual limits (context window and response cap) — and perform a live request to verify that the gateway accepts them. Cursor can only be configured via the UI — it does not have a file that can be safely edited, so you must input the values manually.

Cost Comparison

Cursor uses tokens actively: autocomplete, Chat, Composer, refactoring — all these are requests to the LLM. Typical development (4-6 hours per day) consumes 3-10M tokens daily. Let’s compare the cost:

ProviderModelPrice per 1MDay (~7M)Month (~150M)
JoinGonka GatewayMiniMax M2.7 / DeepSeek V4 Flash / GLM-5.3 Flash$0.0099$0.069$1.49
OpenAIGPT-5.5~$5.00$35$750
AnthropicClaude Sonnet 4.6~$7.00$49$1,050

Savings: In a month of active development, JoinGonka Gateway will save you $750—1,000 compared to OpenAI/Anthropic. For a team of 5 developers — $3,750—5,250 per month.

At the same time, the response quality of the network's models is comparable to GPT-5.5 and Claude for coding tasks: function generation, refactoring, writing tests, and code explanation. They all support native tool calling, making them suitable for agent scenarios as well.

Model Parameters: MiniMax M2.7 supports a context window of 200K tokens, while DeepSeek V4 Flash and GLM-5.3 Flash have longer context windows. The maximum response length through the Gateway is 8192 tokens for MiniMax M2.7 and GLM-5.3 Flash, and 32768 for DeepSeek V4 Flash, which is more than enough for chat and code edits. List of available models: GET https://gate.joingonka.ai/v1/models.

Cursor + Gonka = a full-fledged AI coding assistant for pennies. 30 seconds to set up, free starting tokens, $0.50 per month instead of $750+ with OpenAI. The network's model quality is comparable to GPT-5.5 on coding tasks.

Want to learn more?

Explore other sections or start earning GNK right now.

Get free tokens →