API endpoint https://northerninference.ca/v1 Use this as the base URL in every integration.

Cursor

Use Northern Inference as your Cursor backend: exact sovereign routes, Canadian data residency and per-request custody records for government and regulated teams.

Northern Inference is a sovereign Canadian AI API for government, defence, health and regulated teams, including organizations under the Controlled Goods Program. Every route carries PIPEDA-aligned Canadian data residency, an exact path to the latest frontier and open-weight models, and a per-request chain-of-custody record.

Before you start

  1. 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.
  2. 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.
  3. 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

  1. Open Cursor Settings and go to Models.
  2. In the API Keys section, turn on OpenAI API Key and paste your ni_live_ key.
  3. Turn on Override OpenAI Base URL and enter https://northerninference.ca/v1.
  4. Click Save.
  5. In the model list on the same page, add a model named claude-sonnet-4-6-t4 and turn it on.
  6. Open a chat in Ask mode, choose claude-sonnet-4-6-t4 in the model picker and send a message.
  7. 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 seeWhat to do
Requests do not show up in UsageYou 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 401Check 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 slowThat is normal start-up time at the provider. Later replies are faster.

Optional


Spot a problem? Write to support at northerninference dot ca.

↑