> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode CLI-Konfigurationsanleitung

> AceDataCloud Coding Plan API guide - Ace Data Cloud

## 1. API Key erhalten

Öffnen Sie die [Ace Data Cloud-Anwendungsliste](https://platform.acedata.cloud/console/applications), rufen Sie eine verfügbare Anwendung auf und kopieren Sie den API Key.

![Ace Data Cloud API Key erhalten](https://cdn.acedata.cloud/dvc3cg.jpg)

## 2. OpenCode installieren

```bash theme={null}
curl -fsSL https://opencode.ai/install | bash
```

Sie können auch npm verwenden:

```bash theme={null}
npm install -g opencode-ai
```

## 3. API Key festlegen

```bash theme={null}
export ACEDATACLOUD_API_KEY="dein API Key"
```

Damit dies dauerhaft wirksam ist, fügen Sie diese Zeile zu `~/.zshrc` oder `~/.bashrc` hinzu und öffnen Sie anschließend das Terminal erneut.

## 4. Provider konfigurieren

Bearbeiten Sie `~/.config/opencode/opencode.json`:

```json theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "acedatacloud": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ace Data Cloud",
      "options": {
        "baseURL": "https://api.acedata.cloud/v1",
        "apiKey": "{env:ACEDATACLOUD_API_KEY}"
      },
      "models": {
        "MODEL_ID": { "name": "MODEL_ID" }
      }
    }
  }
}
```

Gehen Sie zum [Modellverzeichnis](https://platform.acedata.cloud/models), um die Modellnamen anzuzeigen (zum Beispiel `claude-opus-5`, `gpt-6-sol`), und ersetzen Sie alle `MODEL_ID` durch denselben Namen; bei einer präzisen Prüfung gilt der Wert `id` in der Antwort von `/v1/models`. Dieser Wert ist der Modellname, der vom API-Parameter `model` verwendet wird, und nicht die UUID des Dienstes oder der API. Ace Data Cloud verwendet hier Chat Completions, daher ist der Adapter `@ai-sdk/openai-compatible`.

## 5. Überprüfen und starten

```bash theme={null}
opencode auth list
opencode models acedatacloud
opencode run --model acedatacloud/MODEL_ID "Reply only OK"
```

Führen Sie anschließend im Projektverzeichnis `opencode` aus. Wenn das Modell nicht erscheint, überprüfen Sie den Konfigurationsdateipfad, die JSON-Syntax und die Umgebungsvariable; 401 bedeutet, dass der Key ungültig ist oder nicht exportiert wurde.

Die IDE-Erweiterung verwendet dieselbe OpenCode-Runtime-Konfiguration wieder, siehe [OpenCode IDE Extension](https://platform.acedata.cloud/documents/opencode-ide-integration).

## Offizielle Referenzen

* [OpenCode Providers](https://opencode.ai/docs/providers/)
* [OpenCode-Konfiguration](https://opencode.ai/docs/config/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.