How to use GPT-5.2 in Cursor
Cursor is one of the most popular AI-native code editors, and GPT-5.2 is a natural fit for its Chat, Composer, and inline edit features. The catch: Cursor's built-in model list and pricing aren't always the cheapest or most flexible way to reach the model you want. The good news is that Cursor speaks the OpenAI API format, so you can point it at any OpenAI-compatible gateway — including AnyModel — and use GPT-5.2 with a single key.
This guide walks through the manual setup, why it's worth doing, and how to swap models later without touching your config.
Why route Cursor through AnyModel
AnyModel exposes one OpenAI-compatible endpoint at https://anymodel.org/v1, and one API key reaches every model — GPT, Claude, Gemini, DeepSeek, GLM, Kimi, Qwen, and Grok. To switch models you change a single string (the model id); nothing else in your setup changes.
A few practical reasons this matters for Cursor:
- No subscription, no minimums. You pay per token, so light days cost almost nothing.
- Free to start. You get 1,000,000 tokens on signup, and a total of 6,000,000 if you link Telegram — no credit card required.
- Model freedom. Try GPT-5.2 for one task and Claude or Gemini for the next from the same account. The model comparison page helps you pick.
Step 1: Get your API key
Create an account and copy your key from the dashboard. Keep it somewhere safe — it's the only credential you need for every model.
Step 2: Add the endpoint in Cursor
Cursor isn't one of the tools covered by AnyModel's one-line installer (that's reserved for codex, claude, opencode, and hermes), so Cursor uses a quick manual OpenAI-compatible setup instead.
- Open Cursor and go to Settings → Models (or Cursor Settings → Models depending on your version).
- Find the OpenAI API Key section and expand Override OpenAI Base URL.
- Set the base URL to:
https://anymodel.org/v1
- Paste your AnyModel API key into the OpenAI key field.
- Click Verify / Save. Cursor will validate the connection.
Step 3: Add GPT-5.2 as a model
Because you're overriding the base URL, you tell Cursor which model id to send. In the Models panel, add a custom model and enter the GPT-5.2 model id exactly as AnyModel expects it (check the models list for the current id string). Once added, GPT-5.2 will appear in Cursor's model picker for Chat and Composer.
That's it — open Cmd/Ctrl-L to chat, or Cmd/Ctrl-K for an inline edit, and select GPT-5.2 from the dropdown.
Verifying it works
If you want to confirm the endpoint and key are good before fiddling with the editor, a one-line curl does the trick:
curl https://anymodel.org/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.2","messages":[{"role":"user","content":"Say hi from Cursor"}]}'
A normal JSON completion means Cursor will work too.
Switching models later
The biggest payoff of this setup is flexibility. Stuck on a tricky refactor? Switch the selected model in Cursor's picker to Claude or Grok — same key, same endpoint, no reconfiguration. This is ideal for teams that want to benchmark models on real tasks instead of guessing.
A note on privacy
Your code is sensitive, so it's worth being precise. AnyModel offers Ghost Mode, an opt-in setting that uses zero-retention keys: we don't store your prompts or responses, only a token counter for billing. To be honest about what that does and doesn't mean — the underlying model provider still receives your prompt to generate a response, so this isn't a claim of total privacy. It simply removes our side from the retention picture.
Wrap-up
Routing Cursor through AnyModel takes about two minutes: override the base URL, paste one key, add the GPT-5.2 model id. After that you get pay-per-token pricing, free starter tokens, and the ability to jump between GPT-5.2, Claude, Gemini, and more without ever editing your config again. For more setup walkthroughs, browse the blog.
Ready to code with GPT-5.2 in Cursor? Create your free AnyModel account and get up to 6,000,000 tokens to start.
AnyModel