# opencode

## Setup

Add AIxAPI as a provider in `opencode.json` (project root) or `~/.config/opencode/opencode.json`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "aixapi": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "AIxAPI",
      "options": {
        "baseURL": "https://www.aixapi.io/v1",
        "apiKey": "{env:AIXAPI_API_KEY}"
      },
      "models": {
        "glm-5.3": { "name": "GLM-5.3" },
        "kimi-k3": { "name": "Kimi K3" }
      }
    }
  }
}
```

```bash
export AIXAPI_API_KEY=sk-...
opencode
```

Pick the model with `/models`; it is listed under AIxAPI.

## Models

List any model from the [Model hub](https://www.aixapi.io/model-plaza) under `models`; one API key calls all of them.
