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

OpenClaw

Use Northern Inference with OpenClaw (placeholder)

Get going in 30 seconds

Create ~/.openclaw/openclaw.json:

{
  env: { NI_API_KEY: "ni_live_YOUR_KEY_HERE" },
  models: {
    providers: {
      northerninference: {
        baseUrl: "https://northerninference.ca/v1",
        apiKey: "${NI_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "vertex_ai/gemini-2.5-pro-ca", name: "Gemini 2.5 Pro CA (NI)", input: ["text"], contextWindow: 128000, maxTokens: 16384 },
        ],
      },
    },
  },
  agents: {
    defaults: {
      model: { primary: "northerninference/vertex_ai/gemini-2.5-pro-ca" },
    },
  },
}

Then launch OpenClaw. Your NI models appear under the northerninference provider in the model picker.


Verification note: this config follows OpenClaw's documented generic OpenAI-compatible provider shape. If OpenClaw changes its schema, keep the baseUrl, apiKey, and models[].id values below, then adjust only the surrounding OpenClaw-specific field names.

OpenClaw uses JSON5 config with an OpenAI-compatible generic provider shape. Drop-in works against NI's /v1 endpoint.

Config file

~/.openclaw/openclaw.json:

{
  env: { NI_API_KEY: "ni_live_YOUR_KEY_HERE" },
  models: {
    providers: {
      northerninference: {
        baseUrl: "https://northerninference.ca/v1",
        apiKey: "${NI_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "azure/DeepSeek-V4-Pro-global",
            name: "azure/DeepSeek-V4-Pro-global (NI)",
            reasoning: true,
            input: ["text"],
            contextWindow: 200000,
            maxTokens: 64000,
          },
        ],
      },
    },
  },
  agents: {
    defaults: {
      model: { primary: "northerninference/azure/DeepSeek-V4-Pro-global" },
    },
  },
}

Env vars (alternative)

Put the API key in an env file OpenClaw reads at startup:

# ~/.openclaw/.env
NI_API_KEY=ni_live_YOUR_KEY_HERE

Precedence (OpenClaw reads in this order, last wins): process env, ./.env, ~/.openclaw/.env, openclaw.json's env block.

Choosing model IDs

models[].id is the NI routing key. It must match the model value you would send to https://northerninference.ca/v1/chat/completions.

List live routing keys:

curl https://northerninference.ca/api/billing/models | jq '.models[].model_id'

Use the exact returned string, case-sensitive. Friendly display names are not routing keys.

Route handling

The selected model ID is the route contract. OpenClaw does not need to send extra_body or custom headers for route selection.

Use both controls together:

  1. Register exact routing keys from /models in OpenClaw's model list.
  2. Issue NI API keys with allowed route tiers matching those routes. A key that is allowed only managed Canadian cloud routes will get 400 if it requests a provider-direct route.

Quirks

(service_tier, store, reasoning compatibility hints). Harmless for NI. those fields are not part of NI's contract.

/api/billing/models returns. Case-sensitive.

routes use -ca and -us; other direct provider regions use the actual region, such as -eu-west-2. Use the full route key from /models when you want a specific jurisdiction or region.

not per-request. Configure them on the key in the portal.


Source: tests/user_run_tests/integrations/openclaw.md. Spot a problem? Let us know.