Get going in 30 seconds
Add a Northern Inference provider block to your Codex config
(requires wire_api = "responses"; Codex rejects the old chat wire format):
model_provider = "northerninference"
model = "bedrock/global.anthropic.claude-sonnet-4-6-global"
[model_providers.northerninference]
name = "Northern Inference"
base_url = "https://northerninference.ca/v1"
env_key = "NI_API_KEY"
wire_api = "responses"
export NI_API_KEY=ni_live_YOUR_KEY_HERE
codex --profile northerninference
That is the complete setup. Set NI_API_KEY to your
ni_live_... key from the portal and run codex.
Your usage appears in the portal under Usage within seconds.
Model selection
Set model to an exact NI route ID from /models.
You can also override it per run:
codex --profile northerninference --model bedrock/global.anthropic.claude-sonnet-4-6-global
Do not use old chat-mode snippets
Older Codex examples used wire_api = "chat". Current Codex
rejects that setting. If you see an example with wire_api = "chat",
it is stale for current Codex.
Support status
NI routes POST /v1/responses through the same API-key,
exact-route, BYOK, custody, request-ID, and billing paths as other model
requests. Stored-response follow-up endpoints such as response retrieval,
input items, cancel, and compact are tracked as compatibility follow-ups
until they have production runtime proof.
Using ni-* commands
When your Codex config pins a model name and you need to change which NI
route it uses, send an ni-* command as your prompt. The gateway
intercepts it and responds directly (no model call, no billing).
Useful commands:
ni-models: lists the routes your key can call, numbered.ni-map-model 3: maps your current (config) model name to route 3.ni-map-model <route-id>: maps to an exact route id.ni-unmap: removes the mapping for your current model.ni-status: shows your active model mappings.ni-help: lists all available commands.
Mappings are saved to the account (all keys on the account share them). The command must be the start of the message content.
If a request returns an NI error, include the X-NI-Request-ID
when contacting support.