For AI agents: step-by-step setup guide — /docs/agents.md, documentation index — /llms.txt.

For AI agents

How to hand off integration to an AI agent: a ready-made prompt for any tool. Below — machine-readable documentation addresses and a skill the agent installs with a single command.

Prompt for the agent#

Send this prompt to your AI agent. It will set up the tool following the instructions below and ask you for the key.

Agent prompt
Connect your tool to JoinGonka Gateway — the OpenAI- and Anthropic-compatible API of the Gonka network — following the instructions at https://gate.joingonka.ai/docs/agents.md. I'll provide the key myself: don't save it in repository files and don't modify global environment variables. At the end, verify the connection with a short request and report the result.

Below are the instructions themselves. The agent receives them as Markdown at /docs/agents.md.

Rules#

  • The API key is created by a human — in the dashboard at gate.joingonka.ai. Don't register an account or create keys yourself: ask the user for a key.
  • Keep the key in the JOINGONKA_API_KEY environment variable of your terminal session. Don't write it to files tracked by git, don't commit it, and don't print it in the report.
  • Don't change the global OPENAI_* and ANTHROPIC_* variables — neither in the shell profile nor system-wide: other tools of the user read them. The key and URL are written to the tool's own config — that's what the installer does.

Facts#

  • Base URL for OpenAI API clients: https://gate.joingonka.ai/v1
  • Base URL for Anthropic API clients, without /v1: https://gate.joingonka.ai
  • The key is passed in the Authorization: Bearer jg-… or x-api-key: jg-… header
  • The key for model requests starts with jg-; the management key gm- doesn't grant access to models.
  • Recommended model: zai-org/GLM-5.3-Flash
  • List of available models: GET https://gate.joingonka.ai/v1/models
  • Per key — up to 120 requests per minute; over the limit you get a 429 response with the Retry-After header. Limits and timeouts are in the GET /v1/capabilities response, field limits.

Configure#

Find the user's tool in the table at the end of the section. If there's a --tool value, configure it with the installer; if not, do it manually using the guide.

Via the installer#

One command, no questions: the key comes from an environment variable, the model from a flag. The installer writes the tool's config, saves a copy of the previous one, and verifies the connection with a request to the gateway.

Bash
JOINGONKA_API_KEY=<key> npx -y @joingonka/setup --tool <id> --model deepseek-ai/DeepSeek-V4-Flash-0731 --non-interactive

For tools marked "prints the values" in the table, the installer doesn't write a config: it prints the values you enter in the tool's own settings. Pass them on to the user. This output contains the full key — don't include it in the report.

If the installer says one step is left — this happens when the tool keeps the key in its own storage — relay that step to the user word for word.

FlagWhat it does
--tool <id>Which tool to configure — a value from the tools table.
--model <id>Model ID: for coding agents, use deepseek-ai/DeepSeek-V4-Flash-0731 (long context and the largest response ceiling); all available ones are listed at GET /v1/models.
--non-interactiveNo questions: the key is taken from JOINGONKA_API_KEY.
--scope localConfig in the current project instead of the home directory. Claude Code only; the config file is added to .gitignore.
--no-verifyDon't verify the connection after writing the config.
Exit codeWhat it means
0Done: the config is written or the values are printed, and the test request succeeded. If verification failed because of the network or balance, the installer prints a warning but still exits with code 0 — let the user know.
1Setup failed; the reason is in the output: for example, an unknown --tool value, JOINGONKA_API_KEY not set, or the key doesn't start with jg-.
2The config is written but the test request failed: check the key and the model ID.

If the tool was running, restart it: the config is read at startup.

Manually#

For a tool without an installer, open its guide (link in the table below) and set three values:

  • base URL — https://gate.joingonka.ai/v1 for OpenAI API clients or https://gate.joingonka.ai for Anthropic API clients;
  • key — in the API key field in the tool's settings;
  • model — zai-org/GLM-5.3-Flash or another one from GET /v1/models.

Tools and guides#

Tool--toolWhat the installer does
Cursorcursorprints the values
Claude Codeclaude-codewrites the config
OpenClawopenclawwrites the config
OpenCodeopencodewrites the config
Continuecontinueprints the values
Clineclineprints the values
Aideraiderprints the values
LangChain——
n8n——
Open WebUI——
LibreChat——
Hermeshermeswrites the config
Kilo Codekilowrites the config
Roo Coderooprints the values
LlamaIndex——
PydanticAI——
Vercel AI SDK——
TanStack AI——
ZCodezcodeprints the values
JetBrainsjetbrainsprints the values
Copilot BYOKcopilot-byokprints the values
Zedzedwrites the config
Pipiwrites the config
Codex CLIcodexwrites the config
DeepSeek Harness——
MiniMax Codeminimax-codewrites the config
Warp——
Trae——
Cherry Studio——
omp (Oh My Pi)ompwrites the config
OpenHands——
Qwen Codeqwen-codewrites the config
Goosegoosewrites the config
Crushcrushwrites the config
Zoo Codezooprints the values
Kimi Codekimi-codewrites the config
Factory Droiddroidwrites the config
MiMo Codemimo-codewrites the config

Verify#

Verify the key with a balance request: it doesn't spend tokens, and the key is taken from JOINGONKA_API_KEY:

cURL
curl -s https://gate.joingonka.ai/api/balance \
  -H "Authorization: Bearer $JOINGONKA_API_KEY"

Verify the URL, key, and model with a short request to the model:

cURL
curl -s https://gate.joingonka.ai/v1/chat/completions \
  -H "Authorization: Bearer $JOINGONKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "zai-org/GLM-5.3-Flash", "messages": [{"role": "user", "content": "Say OK"}], "max_tokens": 1024}'

A 200 response with the model's text means the connection works. The installer runs this check itself: after it, exit code 0 is enough.

Troubleshoot#

The error arrives in the error field of the response body — with the type and the reason text.

ResponseWhat to do
401 authentication_errorKey rejected. Check that it was copied in full and passed in Authorization: Bearer or x-api-key; a new key is created by the user.
402 insufficient_fundsNo funds in the balance. Tell the user: the balance is topped up in the dashboard.
402 child_key_limit_exceededThe child key's limit is exhausted. A different key or a higher limit is needed — the key owner decides that.
403 forbiddenThis is the management key gm-: it doesn't grant access to models. You need a jg- key.
400 invalid_request_errorBad request. If the model isn't found, the error text lists the available IDs — take one from there or from GET /v1/models.
404 model_not_foundThat model isn't available right now — pick another one from GET /v1/models.
429Too many requests or the network is busy. Wait as many seconds as the Retry-After header says and retry.
503 model_unavailableThe network isn't serving the model right now. Switch to the model from the error text or another one from GET /v1/models.
504 upstream_timeoutThe network didn't start responding in time. Retry the request; for long responses, enable stream: true.
502A gateway or network failure — nothing to do with the key. Retry later; network status is on the Network status page.

All response codes and limits are in the Errors & Rate Limits section.

Report#

At the end, tell the user:

  • which tool was configured and which config file was written (the installer prints the path, with a copy of the previous one next to it); if the installer only printed the values — what the user still needs to enter in the tool's settings;
  • the base URL and model ID;
  • the check result: the response code and the model's reply — or why the check couldn't be performed;
  • what the user still needs to do themselves: for example, restart the tool or top up their balance.

Do not include the key in the report.

Machine-readable addresses#

AddressWhat's there
/llms.txtDocumentation index for language models.
/llms-full.txtThe entire documentation in a single file.
/docs/<page>.mdMarkdown version of a documentation page: the same address with .md appended (/docs/models.md) or a page request with the Accept: text/markdown header.
GET /v1/capabilitiesGateway capabilities and limits — the limits field.
GET /v1/modelsModels currently available.
GET /api/pricingPer-model pricing per 1M tokens and fees.
GET /v1/network-statusModel status and incidents.

Agent skill#

The instructions can be installed as a skill for your agent — then it's always at hand, no prompt needed:

Bash
npx skills add https://gate.joingonka.ai