Integrations/OpenCode

OpenCode

AI Tool

OpenCode is a fast terminal-first AI coding agent. It reads a JSON config file where you can register Qubax as a provider with a custom base URL and API key, then select any of 340+ models.

Official docs

Config

JSON
{
  "provider": {
    "qubax": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Qubax",
      "options": {
        "baseURL": "https://api.qubax.ai/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "gpt-5": {
          "name": "GPT-5"
        }
      }
    }
  }
}

Setup steps

  1. 1

    Install OpenCode

    Install OpenCode following the instructions at opencode.ai (typically via npm or the standalone binary).

  2. 2

    Create the config file

    Create ~/.config/opencode/config.json with the provider block shown above.

  3. 3

    Set the provider and model

    Inside the config, register a provider named "qubax" with baseURL set to the Qubax endpoint, your apiKey, and a models entry for gpt-5.

  4. 4

    Run opencode

    Launch opencode in your terminal. Select the qubax provider and the gpt-5 model from the picker.

⚠️
Keep your config file private — it contains your API key. Add it to .gitignore if you keep it in a repo.

Test your connection

Paste your Qubax API key and send a live request to verify everything is wired up. Don't have a key yet?

Create one in the dashboard