Skip to content
Apixo
Tools

OpenCode

Configure OpenCode to use Apixo models.

Two OpenCode versions, two files. The desktop app (version 2) from opencode.ai needs the OpenCode Desktop file. OpenCode in a terminal (version 1.x) needs the OpenCode (terminal) file. Each version ignores the other one's format. Get both with your key filled in from Dashboard → Setup, or ask the bot with /setup.

Terminal (version 1.x)

OpenCode reads ~/.config/opencode/opencode.json (or opencode.json in your project). Minimal example:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "apixo/gpt-6-astra",
  "provider": {
    "apixo": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Apixo",
      "options": { "baseURL": "https://api.apixoai.online/v1", "apiKey": "sk-apixo-..." },
      "models": {
        "gpt-6-astra": { "name": "gpt-6-astra" },
        "glm-5.2": { "name": "glm-5.2" }
      }
    },
    "apixo-claude": {
      "npm": "@ai-sdk/anthropic",
      "name": "Apixo — Claude",
      "options": { "baseURL": "https://api.apixoai.online/v1", "apiKey": "sk-apixo-..." },
      "models": { "claude-fable-5": { "name": "claude-fable-5" } }
    }
  }
}

Run opencode and choose a model with /models.

Desktop app (version 2)

Use the opencode.json file, not the provider screen. Named providers in OpenCode's list (AI/ML API, OpenRouter…) are other companies, so your Apixo key won't work there. The desktop app's Custom provider form currently always fails with "Custom providers are unavailable on this server". That is a known OpenCode 2.x bug, not your key, and the config file works.

  1. Download the OpenCode Desktop file from Dashboard → Setup (or /setup → OpenCode Desktop in the bot). It's called opencode.json.
  2. Save it as C:\Users\<your name>\.config\opencode\opencode.json. Tip: type %USERPROFILE% in the File Explorer address bar, then create the .config and opencode folders if they don't exist. On macOS / Linux: ~/.config/opencode/opencode.json.
  3. Make sure the file is not saved as opencode.json.txt (turn on View → File name extensions in Explorer).
  4. Quit OpenCode completely (also the tray icon near the clock) and open it again.
  5. Click the model name under the chat box and pick a Apixo model.