Continue through Nexus Gateway
Read this first
- Nexus has no launcher for Continue. It writes one model file of its own, and Continue sends that model's calls to Gateway's OpenAI compatible API,
/v1/chat/completions, with a Nexus API key: reserved, metered, checked against your organization's policy and attributed to you. - Gateway cannot tell Continue's calls from any other call on that key.
nexus spendlists them under Nexus Gateway, direct API calls (core), not underagents, and no agent session groups them. - These calls run on a provider key your person, team or organization stored. Nexus credit never pays for them: without a key, Gateway refuses the call with
403. - The run below uses Continue's command line,
cn, which reads the file when you pass it. Continue's editor extension reads the same folder on its own, but it readsNEXUS_API_KEYfrom its own environment or from~/.continue/.env, and no run has shown it yet. - The API key works until you revoke it in Nexus UI, and anyone holding it spends as you. Keep it out of files and shell history.
Set up and run
-
Install the nexus CLI. It needs Node.js 22.6 or later and curl. If the installer says its folder is not on your PATH, add the line it prints to your shell's profile, then open a new terminal.
curl -fsSL https://api.nexus.inc/install.sh | bash -
Sign in to Nexus and approve the code in Nexus UI. The code expires after ten minutes.
nexus auth login -
In Nexus UI, open Settings, then Keys, and create a key named
continue. It is shown once: copy it. -
Install Continue's command line. Nexus never installs it for you. If
cnis not found afterwards, add npm's global folder,$(npm prefix -g)/bin, to your PATH.npm i -g @continuedev/cli -
Owner or admin. If
nexus keys listshows no OpenAI key, add the organization's key, once.nexus keys add openai <key> -
Write Nexus's model file. It holds your Gateway's URL and the name of the variable with the key, not the key. If the file is already there and differs, the last line keeps a copy first, and stops if it cannot.
mkdir -p ~/.continue/models && cat > ~/.continue/models/nexus.yaml.nexus-new <<'EOF' name: Nexus Gateway version: 1.0.0 schema: v1 models: - name: Nexus Gateway gpt-6-luna provider: openai model: openai/gpt-6-luna apiBase: https://api.nexus.inc/v1 apiKey: ${{ secrets.NEXUS_API_KEY }} roles: - chat - edit - apply EOF { [ ! -e ~/.continue/models/nexus.yaml ] || cmp -s ~/.continue/models/nexus.yaml ~/.continue/models/nexus.yaml.nexus-new || cp ~/.continue/models/nexus.yaml ~/.continue/models/nexus.yaml.nexus-backup-$(date -u +%Y%m%dT%H%M%SZ); } && mv ~/.continue/models/nexus.yaml.nexus-new ~/.continue/models/nexus.yaml -
Give this terminal the key. After you run the line, paste the API key and press Enter: nothing shows, and the key stays out of your shell history.
read -rs NEXUS_API_KEY && export NEXUS_API_KEY -
Run one prompt through Gateway on the file's small model. It runs from any folder.
cn --config ~/.continue/models/nexus.yaml -p "Reply with the single word pong"
Check it worked
The call shows in your spend under Nexus Gateway, direct API calls, and first in its recent calls.
nexus spendWhat Nexus changes for the run
Nexus writes one file of its own, ~/.continue/models/nexus.yaml, and changes no file of yours: Continue reads it beside your own settings, or alone when you pass it. The file holds your Gateway's URL and names NEXUS_API_KEY, never the key itself. If the file was already there and differs, step 6 copies it first to ~/.continue/models/nexus.yaml.nexus-backup- and the time, and writes nothing if it cannot. To go back, delete the file, or move that copy back over it, and revoke the key in Nexus UI when you no longer use it.
On a computer without the file, the write is this diff:
--- /dev/null
+++ ~/.continue/models/nexus.yaml
@@ -0,0 +1,13 @@
+name: Nexus Gateway
+version: 1.0.0
+schema: v1
+models:
+ - name: Nexus Gateway gpt-6-luna
+ provider: openai
+ model: openai/gpt-6-luna
+ apiBase: https://api.nexus.inc/v1
+ apiKey: ${{ secrets.NEXUS_API_KEY }}
+ roles:
+ - chat
+ - edit
+ - applyHow it is tested
- One prompt through Gateway's
/v1/chat/completionsby Continue's command line and the steps above, recorded innexus spendunder direct API calls
| Run | Date | Continue | nexus | First call | Steps skipped | Result |
|---|---|---|---|---|---|---|
| continue-2026-10-28-1 | 2026-10-28 | 1.5.47 | 0.14.0+69e1c09 | 2m 59s | provider_key | pass |
Each run is a record in eng/factory/kit/recipes/runs/, with its steps' times, the call and what got in the way.