NyxosNyxos API
Integrations

OpenCode Integration

Configure OpenCode to use Nyxos API through its Anthropic and OpenAI provider connections.

OpenCode is an AI coding agent for the terminal. It is configured with a JSON file — global at ~/.config/opencode/opencode.json or per-project at opencode.json in the project root. Nyxos API plugs into both of its first-party provider types.


Installation

With Node.js 18+ (install it from nodejs.org if needed):

npm install -g opencode-ai
opencode --version

Configuration

Edit or create your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://api.nyxos.shop/v1",
        "apiKey": "sk-5KjBXu1tjqZVzRq0W8Byi1qlbnboSkZzwtobHoXW5OCvRkkZ"
      }
    },
    "openai": {
      "options": {
        "baseURL": "https://api.nyxos.shop/v1",
        "apiKey": "sk-6ZFnmOM61Uw1NI16zCXRdIWa8FZ1JXwHWgremu0UncWEJR8G"
      }
    }
  }
}
  • anthropic provider — for Claude models through the gateway's Anthropic-style routing.
  • openai provider — for GPT, Grok and the rest of the OpenAI-compatible catalog.
  • Both use the same https://api.nyxos.shop/v1 base URL and one of your sk-... keys (the keys above are examples — replace them with your own from API Keys).

Security notice: the API key lives in plain text in this file. Keep opencode.json out of version control when it contains a real key (add it to .gitignore in project repos).


Select a Model

Launch OpenCode and switch to one of the configured providers:

opencode
/models

Pick an exact model ID from /pricing under the anthropic/ or openai/ provider — your key's group must include it (the automatic Auto-A group covers the catalog).

On this page