Before you start
- Create an API key. In the portal, open Keys and click Create Key. Your key starts with
ni_live_. Copy it now; you will not see it again. - Add credit. New accounts start with a balance of $0, and every request is refused until you add credit. Open Billing and click Buy credits.
- Pick a model. Northern Inference model names end in a tier tag, for example
claude-sonnet-4-6-t4. See them all on the Models page.
What works in Cursor
Cursor's documentation says your own API key works only with chat models. Use Northern Inference models in Cursor's chat, in Ask mode. Tab completion and Cursor's own models, such as Composer, keep using Cursor and do not go through Northern Inference. If Agent mode says the model does not support custom API keys, switch to Ask mode.
Cursor also sends every request through its own servers before it reaches Northern Inference, and Cursor's Zero Data Retention policy does not apply when you use your own key. Northern Inference's residency and custody records start when the request reaches Northern Inference. If your team needs the whole path covered, use a tool that connects to Northern Inference directly, such as Claude Code or Continue.
Set up Cursor
- Open Cursor Settings and go to Models.
- In the API Keys section, turn on OpenAI API Key and paste your
ni_live_key. - Turn on Override OpenAI Base URL and enter
https://northerninference.ca/v1. - Click Save.
- In the model list on the same page, add a model named
claude-sonnet-4-6-t4and turn it on. - Open a chat in Ask mode, choose
claude-sonnet-4-6-t4in the model picker and send a message. - Check that the request appears in the portal under Usage within a few seconds.
Some good models to add:
claude-sonnet-4-6-t4
claude-opus-4-8-t4
claude-haiku-4-5-20251001-t4
gpt-4.1-mini-t3
mistral-large-2402-t3
llama3-70b-instruct-t3
Names ending in -t3 run in Canada. See the Models page for every model and its price.
Pick the model you added, not Cursor's built-in one
The base URL you set only applies to models Cursor treats as OpenAI models. If you pick one of Cursor's built-in entries such as "Claude Sonnet" or "Gemini", Cursor calls that company directly and the request never reaches Northern Inference. Always pick the exact name you added, for example claude-sonnet-4-6-t4.
Switching back to Cursor's own models
While OpenAI API Key is on, Cursor attaches your Northern Inference key to its requests. To use Cursor's own models again, turn off OpenAI API Key in Cursor Settings, under Models.
Images
Cursor decides on its own which models can take images, based on the model name. It may not recognize a Northern Inference name such as claude-sonnet-4-6-t4 as able to read images, and then it sends only your text. If Cursor shows a setting to allow images for a custom model, turn it on. Vision and capabilities lists which models accept images.
If a model name is not recognized
Northern Inference answers with HTTP 404 and Model 'X' is not a route this key can call. It never swaps in a different model. Use a name from the Models page, or type ni-models as a chat message to list the models your key can call.
Troubleshooting
| What you see | What to do |
|---|---|
| Requests do not show up in Usage | You picked one of Cursor's built-in models. Pick the name you added instead. |
| "This model does not support custom API keys" | You are in Agent mode or using a Cursor model. Switch to Ask mode and pick your Northern Inference model. |
| "Invalid API key", or 401 | Check the key in Cursor Settings, under Models, then quit and reopen Cursor, which can keep an old key. |
402 Insufficient credits. Add credits in the portal under Billing (https://northerninference.ca/portal/?page=billing) to continue. | Add credit in the portal under Billing. |
404 Model 'X' is not a route this key can call. | Use a name from the Models page, or type ni-models in the chat. |
| The first reply after a break is slow | That is normal start-up time at the provider. Later replies are faster. |
Optional
- Spend per project: create a separate key for each project and set Max spend per day when you create it.
- Your own provider keys: turn on BYOK on the key to use your own OpenAI or Anthropic keys for a lower routing-only fee.