# OpenCode

> Add DigitSpace to OpenCode as an OpenAI-compatible provider in opencode.json and pick any model with /models.

Source: https://digitspace.ai/docs/tools/opencode · Last checked: 2026-10-31

Add DigitSpace as a provider in `opencode.json`, in your project or in `~/.config/opencode/`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "digitspace": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DigitSpace",
      "options": {
        "baseURL": "https://api.digitspace.ai/v1",
        "apiKey": "{env:DIGITSPACE_API_KEY}"
      },
      "models": {
        "auto": {},
        "claude-sonnet-5-5": {},
        "gpt-6-luna": {}
      }
    }
  }
}
```

Set `DIGITSPACE_API_KEY` in your shell, start `opencode`, and choose a model with `/models`. List any model IDs from the [models page](/models) under `models`.
