NezhaGateNezhaGate

Cursor chat and agent can run on your own OpenAI-compatible service. Enter the key and base URL, then add the model names by hand.

Written against Cursor 3.22

Before you start

  • A paid Cursor plan (Pro or higher): the free plan does not run chat or agent on your own key.
  • On a team plan, an admin must allow personal API keys.
  • Cursor sends the requests from its own servers, so the public NezhaGate address works as is.

Setup

  1. Open Cursor Settings (Ctrl/Cmd + Shift + J) → Models, scroll to the bottom and expand API Keys.
  2. Paste your NezhaGate key under OpenAI API Key and switch on Use OpenAI API Key (two separate steps; both are needed).
  3. Switch on Override OpenAI Base URL and enter https://nezhagate.com/v1.
  4. Type the exact model name in the models search box (one from the list below, for example) and click Add Custom Model.
  5. Restart Cursor, open a new chat and pick the model you added.
Base URLhttps://nezhagate.com/v1

Which models to add

NezhaGate chat models on sale that you can add in Cursor:

gpt-5.6-sol · gpt-5.6-terra · gpt-5.6-luna · gpt-6-astra · gpt-6.1-sol · gpt-6-sol · gpt-6-luna · deepseek-v4.1-flash · deepseek-v4-flash-0731 · glm-5.3 · glm-5.3-flash · kimi-k3 · qwen3.7-max · qwen3.8-max · qwen3.8-max-0902 · qwen3.8-flash · doubao-seed-2-1-pro · doubao-seed-2-1-turbo · grok-4.7

  • Cursor sends any model whose name starts with claude- through its Anthropic key, and that slot has no base-URL override, so NezhaGate's Claude models cannot be used in Cursor. Names starting with gemini- are not guaranteed to use the custom address either, so the list above leaves them out. For Claude, use Claude Code.
  • A name that matches one of Cursor's own models (such as gpt-5.5) cannot be added; pick another model.
  • To send images, pick a model that takes image input (see each model's API doc).

Limits to know

  • Tab completion never uses your own key; only chat and agent go through NezhaGate.
  • The setting applies to every OpenAI-family model: while it is on, some of Cursor's own models report that they do not support custom keys. To use them again, switch Use OpenAI API Key off.
  • Cursor has no verify button for custom keys, and the key field does not show the key after saving; sending a message is the best test.

Test

Open a new chat, pick the added model and send Reply with exactly: ok. Once it answers, the request shows up in the call logs of your console.

Troubleshooting

Model name is not valid / AI Model Not Found

Use OpenAI API Key is off (no key was sent), or the model name starts with claude-.

This model does not support custom API keys

A Cursor model is selected. Pick a model you added, or switch Use OpenAI API Key off to use Cursor's own.

Invalid API key / Unauthorized User API key

The key is wrong: paste the full key again (the field does not show the old one; just overwrite it).

Stuck on Planning next moves, then a rate-limit or unavailable error

Usually the free plan, which does not run custom keys, or a wrong base URL. Check the plan and that the address is https://nezhagate.com/v1.

More integrations