Skip to main content

pi

pi is a terminal coding agent. It runs on Artemis through your NuRoute Chat plan: Artemis picks the model for each call.

Before you start​

  • A Personal or Personal Max plan (Lite doesn't include the API).
  • An API key: in NuRoute Chat, open Account → API and create one. It starts with nrc_.
  • pi installed (npm install -g @mariozechner/pi-coding-agent).

Run it​

Put your key in place of nrc_YOUR_KEY:

export NUROUTE_API_KEY=nrc_YOUR_KEY; node -e 'const fs=require("fs"),p=require("path"),d=process.env.PI_CODING_AGENT_DIR||p.join(require("os").homedir(),".pi/agent"),f=p.join(d,"models.json");fs.mkdirSync(d,{recursive:true});const c=fs.existsSync(f)?JSON.parse(fs.readFileSync(f,"utf8")):{};(c.providers??={}).nuroute={baseUrl:"https://chat.nuroute.ai/v1",api:"openai-completions",apiKey:"NUROUTE_API_KEY",models:[{id:"artemis",name:"Artemis",input:["text","image"]}]};fs.writeFileSync(f,JSON.stringify(c,null,2))' && pi --provider nuroute --model artemis

pi has no setting for a server address, so the line first adds NuRoute to pi's ~/.pi/agent/models.json, then starts pi. Other providers in that file are kept, and running it again is harmless. The file holds only the variable's name, not your key.

Next time:

NUROUTE_API_KEY=nrc_YOUR_KEY pi --provider nuroute --model artemis

Or pick nuroute/artemis with /model inside pi; Ctrl+S saves it as the default.

Or edit models.json yourself​

{
"providers": {
"nuroute": {
"baseUrl": "https://chat.nuroute.ai/v1",
"api": "openai-completions",
"apiKey": "NUROUTE_API_KEY",
"models": [{ "id": "artemis", "name": "Artemis", "input": ["text", "image"] }]
}
}
}

pi's anthropic-messages API works too, with "baseUrl": "https://chat.nuroute.ai".

What it costs​

Every call counts against your plan's weekly tokens, shared with chat. Cached input (the part of each call repeated from the one before) counts at a tenth.

What works​

FeatureSupported
Chat, streaming and tools (pi's file and shell tools)✓
Images (pi -p @screenshot.png "…")✓ sent to a model that can see them; PNG, JPEG, WebP or GIF up to 5 MB, the 20 newest in a session
PDFs✓ read as text, like files attached in chat (up to 10 MB; the first 100,000 characters)
Thinking level (--thinking)Ignored: Artemis decides

Errors are the same as for Claude Code.