> ## 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 Configuration Guide

> AceDataCloud Coding Plan integration guide - Ace Data Cloud

## 1. Obtain an API Key

Open the [Ace Data Cloud application list](https://platform.acedata.cloud/console/applications), enter an available application, and copy the API Key.

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

## 2. Install OpenCode

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

You can also use npm:

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

## 3. Set the API Key

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

To make it effective long-term, add this line to `~/.zshrc` or `~/.bashrc` and reopen the terminal.

## 4. Configure the Provider

Edit `~/.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" }
      }
    }
  }
}
```

Go to the [model catalog](https://platform.acedata.cloud/models) to view model names (for example, `claude-opus-5`, `gpt-6-sol`), and replace all `MODEL_ID` values with the same name; for precise verification, use the `id` value in the `/v1/models` response. This value is the model name used by the API `model` parameter, not the UUID of the service or API. Ace Data Cloud uses Chat Completions here, so the adapter is `@ai-sdk/openai-compatible`.

## 5. Verify and Start

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

Then run `opencode` in the project directory. If the model does not appear, check the configuration file path, JSON syntax, and environment variables; 401 indicates that the Key is invalid or has not been exported.

The IDE extension reuses the same OpenCode runtime configuration; see [OpenCode IDE Extension](https://platform.acedata.cloud/documents/opencode-ide-integration).

## Official References

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


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