Before you configure a client
Create an API key, then run the one-line automatic setup or follow the manual setup for your tool below. Store the key in your environment or your tool's secure settings.
Manage API keysAutomatic setup
Paste your key and run one command. The script detects macOS, Linux, or Windows, finds the coding tools you have installed, and points them at Nixo with your key and the right base URL. Every changed file is backed up first.
The key stays in your browser and is only used to build the command below.
$ curl -fsSL https://nixo.codes/setup=sk-nx-YOUR_KEY | bash| Tool | What the script changes |
|---|---|
| Claude Code | ~/.claude/settings.json |
| Codex CLI / Desktop | ~/.codex/config.toml |
| OpenCode | ~/.config/opencode/opencode.json |
| Pi | ~/.pi/agent/models.json |
| Hermes Agent | ~/.hermes/config.yaml + .env |
| Conductor | uses the Claude Code and Codex settings (macOS) |
| Cursor | key copied to clipboard; paste once under Settings > Models |
Tools that are not installed are skipped. NIXO_API_KEY is also saved to your shell profile (or as a Windows user environment variable). Prefer not to put the key in the URL? Run curl -fsSL https://nixo.codes/setup | bash or irm https://nixo.codes/setup | iex and the script asks for it.
Claude Code
Anthropic-compatible clients use the Nixo root URL without /v1. Add these values to your Claude Code settings.
{
"env": {
"ANTHROPIC_BASE_URL": "https://nixo.codes",
"ANTHROPIC_AUTH_TOKEN": "your-key-here"
}
}Conductor can use the same Claude Code settings. You can also set ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY directly in its app environment.
export ANTHROPIC_BASE_URL=https://nixo.codes
export ANTHROPIC_API_KEY=your-key-hereCodex CLI / Desktop
Create or edit ~/.codex/config.toml and register Nixo as a Responses-compatible provider.
model = "openai/gpt-6-sol"
review_model = "openai/gpt-6-sol"
model_provider = "nixo"
[model_providers.nixo]
name = "Nixo"
base_url = "https://nixo.codes/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"Set your key in the environment before launching Codex:
export OPENAI_API_KEY=your-key-hereTo use another supported GPT model, update both top-level model fields to its ID from the model catalog. In Codex Desktop, set Base URL to https://nixo.codes/v1 and enter your Nixo API key.
SDK examples
Use the official SDKs with a custom base URL. Install the Anthropic or OpenAI SDK in your project before importing it. Streaming is supported and metered (stream: true, messages.stream()): events are relayed as they arrive and billed from the final token usage the stream reports. If a stream is cut off before it reports usage, the prompt plus the output received so far are billed as an estimate.
Python · Anthropic SDK
import anthropic
client = anthropic.Anthropic(
api_key="your-key-here",
base_url="https://nixo.codes",
)
message = client.messages.create(
model="anthropic/opus-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)Python · OpenAI SDK
from openai import OpenAI
client = OpenAI(
api_key="your-key-here",
base_url="https://nixo.codes/v1",
)
response = client.chat.completions.create(
model="anthropic/opus-5-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)TypeScript · Anthropic SDK
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "your-key-here",
baseURL: "https://nixo.codes",
});
const message = await client.messages.create({
model: "anthropic/opus-5-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content[0].text);Environment variables
| Variable | Value | Used by |
|---|---|---|
| ANTHROPIC_BASE_URL | https://nixo.codes | Claude Code, Conductor, Anthropic SDKs |
| ANTHROPIC_API_KEY | Your Nixo key | Anthropic-compatible clients |
| ANTHROPIC_AUTH_TOKEN | Your Nixo key | Claude Code alternative |
| OPENAI_BASE_URL | https://nixo.codes/v1 | Codex, OpenAI SDKs |
| OPENAI_API_KEY | Your Nixo key | OpenAI-compatible clients |
Anthropic-compatible clients use https://nixo.codes with no /v1. OpenAI-compatible clients use https://nixo.codes/v1.
Next up: make your first API call
Explore endpoints, request formats, and error responses.