systems guide
How to Add OpenRouter.ai to Cursor
Step-by-step guide to integrating OpenRouter.ai into your Cursor IDE and unlocking custom LLMs like GLM-4.5.
So you're ready to unlock custom models in Cursor, eh? Good. Here's exactly how to plug in OpenRouter.ai so you can run stuff like z-ai/glm-4.5 directly inside your coding flow.
Follow these steps carefully, or you’ll just end up confused and yelling at your terminal.
🚀 Step-by-Step: Integrating OpenRouter.ai into Cursor
-
Open Cursor Settings
Click the gear icon (bottom-left). Yes, the thing you’ve ignored until now. -
Navigate to Models
Once inside settings, go to the Models section. -
Disable ALL Current Models
That’s right. Every single one. Disable anything that’s checked or active. -
Scroll Down to > Api Keys
You’ll find a collapsible section labeled > Api Keys. Click it to expand. -
Override the OpenAI Base URL
Under the OpenAI API Key area:-
Check the box that says Override OpenAI Base URL
-
Paste this into the field:
OpenRouter base URL https://openrouter.ai/api/v1
-
-
Find the Right Model Name
This part matters. Go to https://openrouter.ai/models.
Find the proper name of the model you want to use, for example z-ai/glm-4.5. You’ll need to type it exactly like that when adding a new model. -
Add the Model in Cursor
Back in Cursor:- Click Add New Model
- Paste the model name from OpenRouter (e.g., z-ai/glm-4.5)
- Save it
-
Add Your OpenRouter API Key
Paste your API key into the OpenAI API Key section.
Then hit Verify.If everything goes well, you’ll see something like:
With your cursor Pro+ subscription, you do not need to use your own OpenAI key unless you're using custom models.
-
Test the Integration
Open the Cursor chat and try talking to your newly added model.
If it replies, congrats, you’re golden.
✅ Bonus Tips
- You can add multiple models from OpenRouter.ai now.
- Check out z-ai/glm-4.5-air:free: it’s one of the free models and surprisingly solid.
⚠️ Heads up: Free-tier models may use your prompts and completions as training data. So… maybe don’t use them for your nuclear launch codes.
Happy hacking.
~ FIN ~
Marc Uy Dagatan
Writes about AI systems, building teams, and the lessons usually learned the expensive way. Founder of MAD Software. Fighter, actor, dad: the three lanes are the same fight.
Related essays
- systems / review · · 11 minGLM-4.5 vs Claude Opus: The Price Gap That Feels IllegalA full teardown of GLM-4.5 vs Claude Opus across light coding, heavy reasoning, and scale. Spoiler: GLM-4.5 is still cheaper, anywhere from 5× to 100× depending on the workload.#ai #tools
- systems / review · · 3 minWhen GPT-5 Becomes That Talented but Annoying TeammateMy love-hate relationship with GPT-5 in Cursor: gorgeous code, but a habit of making things that don't actually work unless I crank it to MAX mode.#ai #tools
- systems / guide · · 8 minAI Vibe Coding for the UninitiatedA beginner's on-ramp to jamming with AI: fast sketches, real guardrails, and code you won't be ashamed to keep.#ai #tools #engineering