Connect Cursor to SpiderGate
Who this is for: anyone using the Cursor editor who wants its chat to call models through SpiderGate.
What this does: walks you through Cursor's OpenAI API key and base-URL override settings, and a custom model that routes to SpiderGate.
Before you begin
The Cursor editor. On a Teams or Enterprise plan, an admin can hide personal API keys.
Permission to mint agent tokens for your brand in SpiderGate.
About 5 minutes.
What to know first
Cursor's help says "Custom API keys only work with chat models. Tab completion continues using Cursor's built-in models", and that all requests are "routed through Cursor's servers for final prompt building". So SpiderGate sees requests from Cursor's servers, and Cursor's Zero Data Retention policy "does not apply when you use your own API keys". On Teams and Enterprise plans, Cursor charges its token rate even on your own key.
Note: Cursor's help pages document API keys for five providers but not the base-URL override. The steps below follow what Cursor staff describe on Cursor's own forum.
Warning: Cursor staff say the override is global: "When override is enabled, all requests go through the custom endpoint, including Cursor-managed models". Turn it off when you want your Cursor plan's own models.
Steps
Step 1 — Mint an agent token
In SpiderGate, open Keys (/dashboard/gate/keys) and choose Connect an agent. Name it after the tool, set its limits, and create it. Copy the token now: SpiderGate shows it exactly once. See Agent Keys for budgets and scopes; the tool needs gate:chat and gate:models, which new tokens have by default.
Agent tokens expire, by default after 30 days. Note the date, and mint a new one before then.
Step 2 — Set the key and base URL
Open Cursor Settings → Models and scroll to API Keys. Under OpenAI API Key, paste your SpiderGate token and turn on Use OpenAI API Key. Turn on Override OpenAI Base URL and enter https://spideriq.ai/api/gate/v1.
Step 3 — Add a custom model
Add a custom model whose name is exactly the SpiderGate model id, for example spideriq/coding. Do not use a name that starts with claude-: Cursor staff say Cursor sends those to the Anthropic key slot instead.
Restart Cursor, open a new chat, and pick the model.
Verify it worked
Send one chat message. Open Traces in the SpiderGate dashboard (Traces). Your request appears under the agent token you minted, with the model that served it.
Troubleshoot
"Model name is not valid". The custom model name starts with claude-. Rename it.
Requests hang. Cursor staff suggest Cursor Settings → Network → HTTP Compatibility Mode → HTTP/1.1.
Agent mode fails while Ask mode works. Cursor once sent Responses-API requests from Agent mode to custom endpoints; its staff say this was fixed in June 2026. If you still see it, use Ask mode and tell us.
Your Cursor plan's own models stopped working. The override sends everything to SpiderGate. Turn Override OpenAI Base URL off to use them.