Cursor custom API: Override OpenAI Base URL with a go2llm key
Cursor doesn't have to talk to Cursor's own backend. Settings has a switch called Override OpenAI Base URL, a key field next to it, and a Custom Models list — three fields, and Cursor will send its chat traffic wherever you point it. Below is how to point it at https://go2llm.tech/v1 with a gk_sk_… key, and what to check once it's set.
We have not run a live request through this. That needs an actual Cursor GUI open in front of a human, and we don't have one running right now, so we're not claiming this connects and we're not claiming it doesn't. What follows is built from Cursor's own docs and Cursor's own settings screen — step 4 below is where you find out for yourself, and it's not a formality. Claude Code and OpenCode are the two clients we've confirmed with a live call. If you get through the steps below, tell @go2llm_support what happened — pass or fail — and this page gets a real status instead of a hedge.
Sources: Cursor — Models, LiteLLM — Cursor integration.
Written 2026-09-14.
What you'll need
- Cursor installed, with access to the model settings panel.
- A go2llm key starting with
gk_sk_. Registration credits $1 to your balance, which covers a first test without topping up. The minimum top-up is $1. - The OpenAI-compatible base URL:
https://go2llm.tech/v1. - The exact public model ID. The catalog is open, no key required:
curl https://go2llm.tech/v1/models. Pick one whoseendpointsfield listschat.completions.
Setting it up
Step 1: turn on Override OpenAI Base URL
Open Settings → Cursor Settings → Models, find Override OpenAI Base URL, and flip it on. In the address field:
https://go2llm.tech/v1
The /v1 suffix is not optional. Cursor appends /chat/completions to whatever base you give it, and without /v1 the request lands on a path that doesn't exist.
We don't know which Cursor builds or plans show this switch at all — user reports say it's missing in some versions, but we haven't confirmed that ourselves.
Step 2: drop the key into OpenAI API Key
The same panel has a key field. Paste the full go2llm key, prefix included:
gk_sk_YOUR_KEY
The key, the base URL and the model ID have to belong to the same provider. Mix a go2llm key with an OpenAI base URL, or the reverse, and you get an authentication error — not some blended mode where half of it works.
Step 3: add the model under Custom Models
Add a custom model and give it the exact id from the catalog — not "gpt-4o", not a display name. Pull the real value:
curl -s https://go2llm.tech/v1/models
Pick one where endpoints includes chat.completions — that's the protocol Cursor speaks. You can also check a single model directly:
curl -s https://go2llm.tech/v1/models/claude-sonnet-5
The id that comes back is canonical (claude-sonnet-4-5) even if you asked by an alias — use whatever the catalog hands you, not what you typed in.
Step 4: hit Verify, then test the two modes separately
Verify only confirms that something OpenAI-compatible answers at that address and key. A green check here is not a working integration — it's a ping.
Two separate checks come after it:
- An actual message in chat.
- An actual message in agent mode.
These are different code paths inside Cursor, and one working says nothing about the other: several Cursor features stay pinned to Cursor's own backend regardless of your override — tab-completion, for one, never leaves it. So a working chat reply doesn't mean the agent works, and a broken agent doesn't mean chat is broken either.
Step 5: check what you were actually charged
After a response comes back, open the go2llm dashboard and compare the charge against the usage.cost_usd field the gateway returns on every response. A mismatch is worth a message to support with the request_id from the error body or the x-go2llm-request-id header.
Confirming the connection works
Test the gateway on its own first — that way a failure in Cursor and a failure in your key don't get confused with each other:
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 says "working", and the usage block carries cost_usd — the real price of that one call.
Check the balance before a long session with the same key:
curl https://go2llm.tech/v1/me -H "Authorization: Bearer gk_sk_YOUR_KEY"
The response holds balance.spendable_usd, key.quota_usd, key.rpm_limit. If the gateway answers both of these and Cursor still doesn't, the problem lives in Cursor's settings, not the key.
Which model to pick
Current per-model rates are on the pricing page and at GET /api/pricing.
| Model | Why it's in Cursor |
|---|---|
claude-sonnet-5 | Main daily driver for chat and edits |
claude-opus-5 | Unfamiliar codebases, heavier refactors |
claude-haiku-4-5 | Quick edits, commit messages |
gpt-5.3-codex | Code generation on the OpenAI stack |
gpt-5.6-luna | Drafts where price matters more than polish |
deepseek-v4-pro | Bulk operations over a large context |
Full pricing: go2llm.tech/pricing.
If it doesn't work
- 401
no-key. The key never arrived, or got truncated. Check thegk_sk_prefix and that it landed in OpenAI API Key, not the field next to it. - 404
model_not_found. Custom Models has an ID the catalog doesn't recognize. Copy the exact value fromcurl https://go2llm.tech/v1/models. - 404
endpoint_not_found. The client hit a route the gateway doesn't serve. The error body lists every published route — compare it to what Cursor sent. - 400
model_protocol_mismatch. The model isn't served onchat.completions. Pull one from/v1/modelsthat lists this endpoint. - 402
insufficient_balance. Top up (minimum $1). The gateway reserves the estimated cost before the call, so the balance never runs negative. - 429
rate_limit. The default per-key limit is 20 RPM, counted across every model and endpoint together. Respect theRetry-Afterheader; concurrent requests per account are capped separately at 2 by default. - 400
unsupported_content_type. An image or PDF made it into the request: go2llm's text endpoints don't accept binary attachments.
Full error reference: go2llm.tech/errors.
FAQ
Does agent mode work through go2llm? We don't know and aren't claiming either way. Test it separately from chat — they're different paths, and chat can answer just fine while the agent doesn't.
Does tab-completion work? No. It runs on Cursor's own models and the base-URL switch doesn't touch it.
Can Cursor connect over the Anthropic protocol instead? go2llm has a native /v1/messages endpoint with no conversion layer, but the switch in Cursor is literally named "Override OpenAI Base URL" and assumes the OpenAI Chat Completions protocol. We haven't tried Cursor against the Anthropic endpoint, so we can't say whether that combination works.
Will you set this up for me? No — we don't configure integrations for customers. Questions about the gateway itself: support@go2llm.tech, @go2llm_support.
What's next
Other editors and agents are in the tools hub and the coding tools guide. Endpoints, limits and response formats: go2llm.tech/docs.