go2llm API documentation

Roo Code custom API: the OpenAI Compatible provider and go2llm

Roo Code's provider settings live in a panel inside VS Code: pick OpenAI Compatible, fill in the Base URL https://go2llm.tech/v1, a gk_sk_… key, and the exact Model ID. From there Roo Code can call Claude, GPT, Gemini, Kimi and GLM through one key and one dollar balance — no foreign card required.

Verified with a live request: no. This is built from Roo Code's own documentation. If a step doesn't match what you see, tell @go2llm_support and we'll fix it. Claude Code and OpenCode are the only clients we've confirmed with an actual call so far. Roo Code falls into the "bring your own base URL" category, and Roo Code's docs describe that mode as a first-class path, not a workaround.

Documentation source: Roo Code — Using OpenAI Compatible Providers (current mirror: roocodeinc.github.io/Roo-Code/providers/openai-compatible).

Written 2026-09-11.

What you'll need

  1. The Roo Code extension in VS Code, or a VS Code-compatible editor.
  2. A go2llm key starting with gk_sk_. Registration credits $1, the minimum top-up is $1, and you can pay by card, SBP or crypto.
  3. The OpenAI-compatible base URL: https://go2llm.tech/v1.
  4. The exact public model ID. The catalog needs no key: curl https://go2llm.tech/v1/models. 65 models are published at the moment.

Setting it up

Step 1: open Roo Code's settings

Open the Roo Code panel in VS Code and click the gear icon — Roo Code's docs put every provider setting in that one panel.

Step 2: pick the provider

Set API Provider to OpenAI Compatible. This choice matters: pick plain "OpenAI" instead, and Roo Code sends everything to https://api.openai.com/v1, where your go2llm key means nothing.

Step 3: fill in the three required fields

Roo Code's own docs name them exactly like this:

Field in Roo CodeWhat goes in it
Base URLhttps://go2llm.tech/v1
API Keygk_sk_… — your key from the go2llm dashboard
Modelthe exact public ID, e.g. claude-sonnet-5

Roo Code's docs are blunt about the Base URL field: "Enter the base URL provided by your chosen provider. This is crucial." Enter it with /v1 on the end and no trailing slash.

Step 4: fill in Model Configuration

Roo Code adds a Model Configuration section for properties it has no way to guess about a provider it doesn't recognize. The documented fields: Max Output Tokens, Context Window, Image Support, Computer Use, Input Price, Output Price.

What we'd set for go2llm:

  • Image Support — off. go2llm's text endpoints reject binary attachments with 400 unsupported_content_type.
  • Input Price / Output Price — pull current numbers from the pricing page or GET /api/pricing, so Roo Code's own cost tracker shows real dollars instead of OpenAI's rates.
  • Context Window and Max Output Tokens — set per the model you picked.

For exact context-window figures, check the model vendor's own documentation — we don't yet publish one table covering every model in the catalog. The model list itself needs no key: GET https://go2llm.tech/v1/models.

Step 5: confirm the model does native tool calling

This is where Roo Code is stricter than most clients. Its docs say: "Roo Code uses native tool calling exclusively. This is the only supported tool protocol — there is no XML-based fallback." A model that can't call tools in OpenAI's function-calling format simply won't work in Roo Code, full stop.

go2llm serves tools on both /v1/chat/completions and /v1/messages, but tool support is a property of the model, not the gateway. Stick to models the vendor documents as tool-capable: claude-sonnet-5, claude-opus-5, gpt-5.6-sol, gpt-5.3-codex.

Confirming the connection works

Test the gateway by itself first — this tells you immediately whether a failure is the key or the extension:

curl https://go2llm.tech/v1/chat/completions \
  -H "Authorization: Bearer gk_sk_YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5","max_tokens":120,"messages":[{"role":"user","content":"Reply with one word: working"}]}'

Expected: HTTP 200, choices[0].message.content reads "working", and the usage block carries cost_usd — the real cost of that call.

Then in Roo Code: open a new task and type "Read README.md and tell me in one sentence what this project does." Correct behavior is a tool call — Roo Code reads the file, shows the call in the task timeline, then answers. If plain text comes back with no tool call in sight, the model doesn't do native tool calling; switch models.

Which model to pick

Current per-model rates are on the pricing page and at GET /api/pricing — "cache read" is the number that matters most here, since a coding agent like Roo Code spends most of its calls re-reading the same system prompt and file context from cache rather than sending fresh input.

ModelWhy it fits Roo Code
claude-sonnet-5Native tool calling, solid default for everyday tasks
claude-opus-5Native tool calling, harder multi-file work
claude-haiku-4-5Cheaper native-tool-calling option for small steps
gpt-5.3-codexOpenAI-stack tool calling, code-focused
gpt-5.6-solNative tool calling on the OpenAI stack
kimi-k2.7-codeTool calling with a large context budget
glm-5.3Tool calling, budget alternative for routine steps

Comparing input price alone is the wrong comparison here — check GET /api/pricing for the actual cache-read rate before committing to a model.

If it doesn't work

  • 401 no-key (Roo Code shows this as "Invalid API Key"). The key never arrived, or got cut off mid-paste. A go2llm key starts with gk_sk_.
  • 404 model_not_found ("Model Not Found" in Roo Code). The Model field doesn't match the catalog. Copy the exact id from curl https://go2llm.tech/v1/models — claude-sonnet-5 and anthropic/claude-sonnet-5 are different strings.
  • 400 model_protocol_mismatch. The model is published on a different endpoint. /v1/models states the right protocol for each one.
  • 403 model / inactive / expired / ip. The key has a restriction: that model isn't on its allow-list, the key is disabled, it expired, or your IP isn't allow-listed. Check the key's settings in the dashboard.
  • 429 rate_limit. The default limit is 20 RPM per key, and Roo Code running a long autonomous task can hit it easily. Respect Retry-After.
  • 502 upstream_unavailable. The upstream provider is down. A plain-text request is safe to retry after a delay; gateway status is visible at /status.

Full error reference: go2llm.tech/errors.

FAQ

How is Roo Code different from Kilo Code when connecting go2llm? Roo Code needs Base URL, API Key and Model entered by hand. Kilo Code can pull the model list automatically from /v1/models. go2llm's model endpoint is open without a key, so Kilo Code's autodiscovery works, and Roo Code's manual field doesn't have that shortcut.

Why does Roo Code reject tool calling on a cheap model? Roo Code has no XML fallback for tools. Any model that doesn't implement OpenAI's function-calling schema is unusable in Roo Code, regardless of which gateway serves it. That's a Roo Code limit, not a go2llm one.

Can spending be capped? Yes. A go2llm key carries a dollar quota and a list of allowed models. A key with quota 0 has no separate cap and is limited only by the account balance. Every request returns its exact cost in usage.cost_usd.

What's next

How other editors and agents connect: the tools hub and the coding tools guide. Endpoints, limits and response formats: go2llm.tech/docs.

Get a key and make your first request in 3 minutes →