> ## 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 구성 가이드

> AceDataCloud Coding Plan API guide - Ace Data Cloud

## 1. API Key 가져오기

[Ace Data Cloud 애플리케이션 목록](https://platform.acedata.cloud/console/applications)을 열고, 사용 가능한 애플리케이션에 들어가 API Key를 복사합니다.

![Ace Data Cloud API Key 가져오기](https://cdn.acedata.cloud/dvc3cg.jpg)

## 2. OpenCode 설치

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

npm을 사용할 수도 있습니다:

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

## 3. API Key 설정

```bash theme={null}
export ACEDATACLOUD_API_KEY="당신의 API Key"
```

장기간 적용하려면 이 줄을 `~/.zshrc` 또는 `~/.bashrc`에 추가한 후 터미널을 다시 엽니다.

## 4. Provider 구성

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

[모델 카탈로그](https://platform.acedata.cloud/models)로 이동하여 모델 이름(예: `claude-opus-5`, `gpt-6-sol`)을 확인하고, 모든 `MODEL_ID`를 동일한 이름으로 교체하세요. 정확한 검증 시에는 `/v1/models` 응답의 `id` 값을 기준으로 합니다. 이 값은 API `model` 파라미터에서 사용하는 모델 이름이며, 서비스 또는 API의 UUID가 아닙니다. Ace Data Cloud는 여기서 Chat Completions를 사용하므로 adapter는 `@ai-sdk/openai-compatible`입니다.

## 5. 검증 및 시작

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

그런 다음 프로젝트 디렉터리에서 `opencode`를 실행합니다. 모델이 나타나지 않으면 구성 파일 경로, JSON 문법 및 환경 변수를 확인하세요. 401은 Key가 유효하지 않거나 내보내지지 않았음을 의미합니다.

IDE 확장은 동일한 OpenCode runtime 구성을 재사용합니다. [OpenCode IDE Extension](https://platform.acedata.cloud/documents/opencode-ide-integration)을 참조하세요.

## 공식 참고 자료

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


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