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
OpenHands + JoinGonka Gateway: agent on your own endpoint
OpenHands is an open platform for autonomous development: the agent reads the repository itself, runs commands, edits files, and drives a task to completion, while you set the goal and verify the result. In 2026, its primary interface is Agent Canvas, a browser-based console used to initiate conversations with the agent and automation on your own machine, in Docker, on a server, or in the OpenHands cloud. The code is open-source under the MIT license.
OpenHands does not force a specific model: the entire LLM interaction layer is built on LiteLLM, so any OpenAI-compatible endpoint works for the agent. For JoinGonka Gateway, this requires three fields in the settings: Custom Model — openai/deepseek-ai/DeepSeek-V4-Flash-0731, Base URL — https://gate.joingonka.ai/v1, and API Key — your jg-… key. No separate installer is needed: everything is done in the interface in a couple of minutes.
An autonomous agent is the hungriest consumer of tokens: each step carries a system prompt, history, and tool results, and there are dozens of steps in a task. The OpenHands documentation explicitly warns that the agent sends many requests to the model, so keep an eye on consumption. Through the gateway, a million input tokens cost $0.0069 — the same for DeepSeek V4 Flash, GLM-5.3 Flash, and MiniMax M2.7 — so long runs stop being a budget concern. After verifying your email address, 3M free tokens will be credited to your account: this is enough to run the agent on a real task and see your actual consumption.
Which OpenHands do you have: four interfaces and a key
The project currently has several interfaces, and where you look for model settings depends on which one you are running. The values themselves are the same everywhere; only the path to them differs.
| Interface | How to launch | Where to set the model | Status as of September 2026 |
|---|---|---|---|
| Agent Canvas | npx @openhands/agent-canvas or npm install -g @openhands/agent-canvas and command agent-canvas; opens at http://localhost:8000 | Settings > LLM, Advanced tab | The project's primary interface |
| OpenHands CLI | uv tool install openhands --python 3.12, then openhands | First-run wizard, Ctrl+P → Settings, ~/.openhands/agent_settings.json file | Functional, but marked as not actively developed in the README |
| Legacy web interface in Docker | openhands serve or docker run from the documentation; port 3000 | Settings → LLM tab → Advanced toggle | Referred to as Local GUI (Legacy) in the documentation |
| OpenHands Cloud | The project's managed cloud | Same LLM settings page | According to documentation, custom LLM is set the same way; we have not tested this path |
Agent Canvas requires Node.js and uv — the agent's local server runs on it (details in the setup guide). The guide mentions Node.js 22.12 or newer, but the package itself starting from version 1.17 requires Node.js 24 or newer — install 24 to avoid an incompatible version warning. There is also a container option: the ghcr.io/openhands/agent-canvas image provides the interface at http://localhost:8000/canvas and sees only the directories you have mounted.
JoinGonka Key. Register at gate.joingonka.ai/register, verify your email, and create a key with the jg- prefix in the "API Keys" section. One key and one balance work for all models in the network. The OpenHands installer @joingonka/setup does not list this in its tools, and that is not an oversight: its settings live in the interface and the secure backend storage, not in a text config file that can be edited externally.
Connecting to Agent Canvas: three fields on the Advanced tab
Step 1. Launch Agent Canvas and open Settings > LLM. The first-run wizard suggests the native OpenHands provider — you can skip this step, as you can easily return to the settings later.
Step 2. Click Add LLM Profile and go to the Advanced tab: the Basic tab only offers providers and models from the built-in list.
Step 3. Fill in three fields:
| Field | Value |
|---|---|
Custom Model | openai/deepseek-ai/DeepSeek-V4-Flash-0731 |
Base URL | https://gate.joingonka.ai/v1 |
API Key | your jg-… key |
Step 4. Save the profile. Before saving, Canvas verifies the configuration with a backend request: if the key is rejected or the model is unavailable, the profile will not be saved, and you will see an error message.
Step 5. Start a new conversation and send a short message. Conversations already open will continue using the model they were started with.
Why openai/. LiteLLM determines the provider by the model prefix. The openai/ prefix does not mean "OpenAI model," but rather "communicate with the server via the OpenAI Chat Completions protocol." Only the first segment is stripped, so the gateway receives the actual identifier — deepseek-ai/DeepSeek-V4-Flash-0731. OpenHands documentation shows the same scheme using openai/qwen/qwen3.6-35b-a3b as an example. Without the prefix, LiteLLM will refuse to work, returning an LLM Provider NOT provided message.
Why /v1 and nothing more. LiteLLM accesses the server via the official OpenAI client, which automatically appends /chat/completions. Therefore, the address must end with /v1: without the suffix, the request will miss the API; with an extra tail, it will hit a non-existent path. Another Canvas requirement: the address must be accessible from the backend, not just from the browser. The gateway is a public HTTPS address; it is visible from the Docker container just as it is from the host. Techniques like host.docker.internal are only needed for models running on your own machine.
Profiles for all three models. Create a profile for each network model and give them short names — for example deepseek, glm, and minimax (the documentation mentions a limit of ten profiles). You can switch between them directly in the conversation without losing context: by using the profile selection button in the input field or the /model glm command; /model without arguments will display the list. To avoid inserting the key into every profile, you can save it once in the Provider Connections block — it is available on the local backend.
Legacy interface in Docker. The fields are the same: Settings → LLM tab → enable Advanced → Custom Model, Base URL, API Key → Save Changes.
Terminal and automation: CLI, environment variables, SDK
The CLI installs with a single command via uv and on first launch walks you through model setup itself; you can return to it later with Ctrl+P → Settings:
uv tool install openhands --python 3.12
openhandsFor scripts, environment variables are more convenient. An important detail: by default the CLI ignores them and applies them only with the --override-with-envs flag — for a single run, saving nothing:
export LLM_MODEL="openai/deepseek-ai/DeepSeek-V4-Flash-0731"
export LLM_BASE_URL="https://gate.joingonka.ai/v1"
export LLM_API_KEY="jg-your-key"
openhands --override-with-envsThe same set works without an interface — for CI and batch tasks:
openhands --headless --override-with-envs -t "Read calc.py and tell me in one sentence whether it has a bug."In headless mode the agent always acts with auto-approval, so run it where it's allowed to do everything: in a separate directory or container. The --json flag turns the output into a stream of JSONL events — convenient for parsing in a pipeline. That's exactly how we tested the setup on September 21, 2026 on CLI 1.16.0: the CLI header prints Agent initialized with model: openai/deepseek-ai/DeepSeek-V4-Flash-0731, then the agent reads the file and answers substantively.
| Method | Where it applies | Is it saved |
|---|---|---|
Settings > LLM in Agent Canvas | all new conversations on this backend | yes, in the backend storage (~/.openhands) |
The wizard and Ctrl+P → Settings in the CLI | all CLI runs | yes, in ~/.openhands/agent_settings.json |
LLM_MODEL, LLM_BASE_URL, LLM_API_KEY with the --override-with-envs flag | a single CLI run | no |
config.toml | the older V0 line and development mode | relegated to Legacy in the docs; in Agent Canvas and CLI 1.x, settings are set by the methods above |
Saved CLI settings live in ~/.openhands/agent_settings.json: the model there is changed by editing three fields of the llm block — model, api_key, and base_url. Don't create the file from scratch: the first-launch wizard also writes the agent's other settings there, including history compression, without which a long conversation will hit the context window.
If you're embedding the agent into your own code, the OpenHands SDK takes the same three values:
from pydantic import SecretStr
from openhands.sdk import LLM
llm = LLM(
model="openai/deepseek-ai/DeepSeek-V4-Flash-0731",
base_url="https://gate.joingonka.ai/v1",
api_key=SecretStr("jg-your-key"),
)Which model to choose for long autonomous runs
All models in the network have the same price, so the choice comes down to behavior. Two numbers are critical for an autonomous agent. Context window: every step re-sends the history, and the larger the window, the longer the agent can work without data loss. Response ceiling: the step where an agent writes a large file in full must fit within a single response. The table below shows the results of our test running the same task (reading a file and finding an error) via OpenHands CLI 1.16.0 with SDK 1.21.0.
| Model | Custom Model for OpenHands | Context | Response ceiling | Behavior in OpenHands |
|---|---|---|---|---|
| DeepSeek V4 Flash | openai/deepseek-ai/DeepSeek-V4-Flash-0731 | 380K | 32768 | Read the file and answered to the point, without unnecessary text. Long context and the highest response ceiling in the network make it the default choice for multi-hour tasks |
| GLM-5.3 Flash | openai/zai-org/GLM-5.3-Flash | 390K | 8192 | Reasons before answering; completed the tool loop cleanly. A profile for planning and parsing complex logic, with the caveat that part of the response is used for reasoning |
| MiniMax M2.7 | openai/MiniMaxAI/MiniMax-M2.7 | 200K | 8192 | Solved the task, but showed its thought process aloud in the final message. The model has the largest capacity in the network — a backup profile for peak hours and conversation headers |
The recommended workflow for long-running tasks follows the OpenHands documentation advice: plan with one model, execute with another. Start the conversation on the glm profile and request a plan without file modifications; then send /model deepseek and give the execution command. History, files, and task state are preserved when switching. Keep the minimax profile as a third option: it is convenient to switch to it when the other two run out of capacity during peak hours, and you can also assign it to generate conversation headers in Settings > Application.
History compression. Even a window of hundreds of thousands of tokens is finite during multi-hour tasks. In OpenHands, this is handled by a condenser: it collapses old events into a brief summary, which, according to the documentation, reduces latency and token consumption in long conversations. In Agent Canvas, it is configured in the Settings > Condenser section; in our CLI run, it enabled itself automatically with a threshold of 80 events.
Model limits. OpenHands retrieves the context window and response ceiling from the LiteLLM directory, which does not contain Gonka network identifiers (we checked on LiteLLM 1.81), so the agent does not have its own pre-set values for these models. This does not interfere with operation: the gateway applies the response ceiling itself, according to the table above. If you want to set limits explicitly, these are the max_input_tokens and max_output_tokens fields in the SDK, and in Canvas, the All tab opens the full set of profile fields. Details about the default model are available in the DeepSeek V4 Flash overview.
Verification and common errors
You can verify that requests are actually going through the gateway from two sides. From the OpenHands side: start a new conversation and give a short task, like "read the README and summarize in one sentence": the agent must call a tool and respond. From the gateway side: go to your dashboard, "Usage" section: the request will appear in the "By model" breakdown, and the last request time will update in the "By keys" section. If it's empty, the conversation is taking place on another profile: check which one is marked as active.
| What you see | What it means | What to do |
|---|---|---|
LLM Provider NOT provided | The model field is missing the provider prefix | Enter openai/ before the identifier: openai/deepseek-ai/DeepSeek-V4-Flash-0731 |
| Profile won't save, Canvas shows backend error | Canvas verified the configuration with a live request and received a rejection | The error text is one of the lines below: fix the key, address, or model and save again |
AuthenticationError … Invalid API key | The gateway responded with 401: key not accepted | Paste the entire key without extra spaces; check in the dashboard that it hasn't been revoked |
405 Not Allowed and an nginx HTML page | The Base URL is missing the /v1 suffix | The address must be exactly https://gate.joingonka.ai/v1 |
404 … Invalid URL (POST /v1/v1/chat/completions) | The Base URL has an extra tail: a second /v1 or the full /chat/completions path | Leave only /v1 — LiteLLM appends the path itself |
400 … Model "…" not found. Available: … | The identifier after openai/ does not match any network model | The gateway lists available models itself; full list — GET https://gate.joingonka.ai/v1/models |
429 | The key has exhausted its per-minute request limit, or the model is at peak capacity | OpenHands retries the request with an increasing backoff. If it takes too long, switch the profile with the /model command; network status is visible on the status page |
402 | Insufficient funds on balance | Top up your account in the "Billing" section; the key remains active |
| Agent acts like a chatbot: does not touch files, confuses tool calls | The model cannot handle the agent loop; OpenHands documentation advises changing the model in this case | Switch to the DeepSeek V4 Flash profile — in our test run, it passed the agent loop without issues |
According to OpenHands documentation, the number of retries and pauses between them during 429 errors are configured via LLM_NUM_RETRIES, LLM_RETRY_MIN_WAIT, and LLM_RETRY_MAX_WAIT variables. Default values in documentation and SDK differ, so rely on the actual ones: in the CLI 1.16.0 conversation state, we observed 5 attempts with pauses ranging from 8 to 64 seconds.
How much it costs and what to consider
Via JoinGonka Gateway, tokens cost $0.0069 per million for input and $0.021 per million for output — the price is identical for all network models and is pulled onto this page from a live source.
| Scenario | Consumption | Via Gateway |
|---|---|---|
| One-time task: analyze a file, apply a fix | tens of thousands of tokens | fractions of a cent |
| Autonomous feature development | 20-50M tokens | tens of cents |
| 24h of background automations | ~150M tokens | about a dollar |
Estimates in the right column are based on September 2026 prices; how agent economics works is explained in detail in the article about the cheapest API for AI agents.
Spending cap. OpenHands advises setting spending limits — the gateway has this built into the payment model: the balance is prepaid, and the agent will not spend more than what is on the account. Remaining balance and daily consumption are visible in the dashboard. For CI and background automations, create a separate key so their consumption doesn't mix with yours; sub-keys with daily limits are described in the article about Management Keys.
Trust boundary. Agent Canvas, launched via npm, runs with your user permissions and can see the entire file system. For third-party code, use the Docker version: the agent will only see the mounted directory. This is a property of OpenHands itself; it does not depend on the model provider.
Correspondence stays with you. OpenHands stores conversation history locally in ~/.openhands and sends it to the model at each step; the gateway does not store the correspondence — your prompts and code are not retained after the response.
If the task includes images — interface screenshots, diagrams — create a separate profile for it with a vision-capable model: Gonka network models are text-only. This is not a limitation for code, commands, and files.
openai/deepseek-ai/DeepSeek-V4-Flash-0731, Base URL https://gate.joingonka.ai/v1, and the jg-… key. In Agent Canvas, this is under the Advanced tab in Settings > LLM; in the CLI, use the configuration wizard or set LLM_MODEL, LLM_BASE_URL, and LLM_API_KEY environment variables with the --override-with-envs flag; config.toml remains from the previous series. The openai/ prefix selects the protocol, not the vendor, and the /v1 suffix is mandatory. Live runs confirmed the agentic loop on all three network models: by default, use DeepSeek V4 Flash with 380K context and up to 32768 tokens for the response, GLM-5.3 Flash for planning, and MiniMax M2.7 as a backup profile for peak hours.Want to learn more?
Explore other sections or start earning GNK right now.
Get key and free tokens →