Skip to main content
1

Open Settings → Models

Press Ctrl + Shift + J (macOS: Cmd + Shift + J) to open Cursor Settings and pick the Models tab.
2

Enter Base URL and key

Scroll to OpenAI API Key:
  1. Enable Override OpenAI Base URL
  2. Paste the Base URL:
  1. Paste your API key into the key field
  2. Click Verify
A successful Verify means the connection works.
3

Add the model, disable the defaults

Click + Add model and type the exact model of your package:
For the Astra package type gpt-astra. Then disable every default model (gpt-4o, claude…, o1…) and keep only the one you added.
Disabling the defaults is mandatory. If they stay on, Cursor still sends requests to real OpenAI with your key, reports an invalid key, and you will suspect the configuration when the problem is only the selected model.
One wrong character in the model name fails immediately. Copy from the model table instead of typing.
Cursor sends a lot of hidden context. To save tokens, turn off Codebase Indexing in Settings and reference exact files with @file instead of letting it scan the project.

What does not work

Tab completion and Composer Agent run on Cursor’s own infrastructure and ignore the Base URL you set. The key applies to the Chat panel and the models you added.