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

Codex

Run Codex through Northern Inference using your NI API key.

Quick setup

Current Codex releases require the OpenAI Responses API provider wire format. Use wire_api = "responses" and the NI base URL:

model_provider = "northerninference"
model = "anthropic/claude-sonnet-4.5"

[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

Model selection

Set model to an exact NI route ID from /models. You can also override it per run:

codex --profile northerninference --model anthropic/claude-sonnet-4.5

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.


If a request returns an NI error, include the X-NI-Request-ID when contacting support.