Skip to content
↑↓Navigate↵SelectescClose

Client Integrations

Point AI coding clients at a Nexus gateway for model traffic using gateway API keys

Point AI coding clients at a Nexus gateway for model traffic. These guides cover gateway API keys (nxs_…) and base-URL swaps only. They do not cover personal developer keys (nxd_…) or Query HTTP; those are separate observability credentials — see Personal Developer Keys.

Client Edge Guide
OpenCode OpenAI-compatible /v1 OpenCode → Nexus
Cline (VS Code) OpenAI-compatible /v1 Cline (VS Code) → Nexus
Continue (VS Code) OpenAI-compatible /v1 Continue (VS Code) → Nexus
Codex CLI OpenAI Responses /v1 Codex CLI → Nexus
Claude Code Anthropic Messages /anthropic Claude Code → Nexus

Every guide assumes:

  1. A reachable gateway hostname (deployed NEXUS_HOSTNAME, or local http://127.0.0.1:14450 — see Ports).
  2. A gateway API key (nxs_…) scoped to an organization and project.
  3. A registry that already contains the model id you will select.
  4. Upstream credentials for that org/project (BYOK provider key and/or platform PTB lane), so the gateway can dispatch.

Console (preferred on a deployed app): sign in → open the org/project Keys surface → issue a key → copy the nxs_… secret once.

CLI (local / operator):

Terminal window
TOKEN=$(just cli credentials api-keys create \
--org "$ORG_SLUG" \
--project "$PROJECT_SLUG" \
--name coding-client \
--issued-by "$(whoami)")
echo "$TOKEN"

Full bootstrap (user, workspace, BYOK, first chat) is in End-to-End Walkthrough.

Terminal window
GATEWAY_URL="${GATEWAY_URL:-http://127.0.0.1:14450}"
NEXUS_API_KEY="nxs_…"
curl -fsS "$GATEWAY_URL/healthz"
curl -sS "$GATEWAY_URL/v1/models" \
-H "Authorization: Bearer $NEXUS_API_KEY" | jq .

Use a model id from that list in the client. Ids may be bare registry names (gpt-5.4-mini, claude-sonnet-4-6) or routed specs (openai/gpt-5.4-mini, anthropic/claude-sonnet-4-6), depending on how the catalog was imported.

Prefix Use with
nxs_… Gateway model traffic (these guides)
nxd_… Query / Trace HTTP only
Upstream provider keys (sk-…, Anthropic keys, …) Never send these to the Nexus edge; Nexus unwraps the stored BYOK/PTB secret itself
Client dialect Base URL
OpenAI-compatible (/v1/chat/completions, /v1/responses, /v1/models, …) $GATEWAY_URL/v1
Anthropic Messages (Claude Code / Anthropic SDK) $GATEWAY_URL/anthropic

Do not put Query, console, or auth hostnames in these fields. Do not append /chat/completions or /messages to the base URL; clients add those paths.