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

# Droid 설정: 설치, API Key, Base URL 및 사용자 지정 모델

> Droid를 설치하고 BetterToken Base URL 및 API Key를 설정한 다음 호환되는 provider model을 선택하고 일반적인 오류를 해결하세요.

Droid를 BetterToken에 연결하려면 API Key를 준비하고 아래 Base URL을 입력한 후 모델 광장에서 현재 Model ID를 선택하세요.

## 주요 설정

| 필드       | 값                                                                 |
| -------- | ----------------------------------------------------------------- |
| API Key  | BetterToken API Key                                               |
| Base URL | `https://www.bettertoken.ai/v1`                                   |
| 모델       | <a href={"https://bettertoken.ai/pricing"}>모델 광장</a>의 현재 Model ID |

## 사전 요구 사항

* 최신 버전의 도구가 설치되어 있음
* BetterToken API Key: <a href={"https://bettertoken.ai/register"}>등록하고 발급받기</a>
* <a href={"https://bettertoken.ai/pricing"}>모델 광장</a>의 Model ID

### 추가 요구 사항

## 설치

### Droid 설치

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    curl -fsSL https://app.factory.ai/cli | sh
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    irm https://app.factory.ai/cli/windows | iex
    ```
  </Tab>
</Tabs>

## 수동 설정

| 필드       | 값                                                                 |
| -------- | ----------------------------------------------------------------- |
| API Key  | BetterToken API Key                                               |
| Base URL | `https://www.bettertoken.ai/v1`                                   |
| 모델       | <a href={"https://bettertoken.ai/pricing"}>모델 광장</a>의 현재 Model ID |

### 설정

<Steps>
  <Step title="BetterToken API Key 설정">
    <Tabs>
      <Tab title="macOS / Linux">
        ```bash theme={null}
        export BETTERTOKEN_API_KEY="YOUR_API_KEY"
        ```
      </Tab>

      <Tab title="Windows PowerShell">
        ```powershell theme={null}
        $env:BETTERTOKEN_API_KEY="YOUR_API_KEY"
        ```
      </Tab>
    </Tabs>

    `YOUR_API_KEY`를 BetterToken API Key로 바꾸세요. Droid는 JSON configuration에서 `${BETTERTOKEN_API_KEY}` environment-variable expansion을 지원합니다.
  </Step>

  <Step title="Droid config file 편집">
    config file path: `~/.factory/settings.json`

    ```json theme={null}
    {
      "customModels": [
        {
          "displayName": "BetterToken Codex",
          "model": "YOUR_MODEL_ID",
          "baseUrl": "https://www.bettertoken.ai/v1",
          "apiKey": "${BETTERTOKEN_API_KEY}",
          "provider": "openai"
        }
      ]
    }
    ```

    `YOUR_MODEL_ID`를 <a href={"https://bettertoken.ai/pricing"}>모델 광장</a>에서 복사한 현재 **지원되는 provider의 model ID**로 바꾸세요.
  </Step>

  <Step title="Droid 시작 및 model 선택">
    ```bash theme={null}
    cd /path/to/your/project
    droid
    ```

    Droid에서 `/model`을 입력하고 **BetterToken Codex**를 선택하세요. Factory는 settings file 변경을 감시합니다. model list가 refresh되지 않으면 Droid를 종료하고 다시 실행하세요.
  </Step>

  <Step title="작은 테스트 task 실행">
    “이 project의 directory structure를 설명해 주세요.” 같은 작은 task로 시작하세요. Droid가 result를 반환하면 cross-file edits 또는 더 긴 agent tasks를 진행하세요.
  </Step>
</Steps>

<Note>
  `provider`를 `openai`로 설정하세요. Factory의 BYOK configuration에서 이 value는 OpenAI Responses API를 선택합니다. `https://www.bettertoken.ai/v1`과 BetterToken API Key를 사용하세요.
</Note>

## 연결 확인

짧은 테스트 prompt를 보내세요. 도구가 authentication 또는 Model ID 오류 없이 response를 반환하면 연결이 작동합니다. configuration을 변경한 후에는 도구를 완전히 다시 시작하세요.

## 모델 전환

model selector를 열거나 configuration의 `Model` field를 변경하세요. <a href={"https://bettertoken.ai/pricing"}>모델 광장</a>의 정확한 Model ID를 사용한 다음 현재 session을 다시 시작하세요.

## 일반적인 오류

### 문제 해결

| 증상                         | 확인할 사항                                                                                   |
| -------------------------- | ---------------------------------------------------------------------------------------- |
| 사용자 지정 model이 `/model`에 없음 | JSON을 validate하고 `model`, `baseUrl`, `apiKey` 및 `provider`가 모두 있는지 확인                    |
| `Invalid provider`         | UI display label 대신 정확한 lowercase value `"openai"` 사용                                    |
| `401` 또는 `403`             | API Key를 다시 복사하고 Droid process가 `BETTERTOKEN_API_KEY`를 읽을 수 있는지 확인한 뒤 account balance 확인 |
| `404` 또는 Model not found   | `https://www.bettertoken.ai/v1`을 사용하고 모델 광장에서 현재 GPT model ID 복사                         |
| 편집 후에도 이전 model이 남음        | `/model`을 다시 열고 그래도 refresh되지 않으면 Droid를 완전히 종료 후 다시 실행                                  |

### FAQ

### 지원되는 provider를 사용해야 하는 이유는 무엇인가요?

Droid의 `provider: "openai"`는 OpenAI Responses API를 사용합니다. BetterToken의 지원되는 provider는 이에 맞는 OpenAI-compatible endpoint와 model IDs를 제공합니다.

### custom headers가 필요한가요?

표준 BetterToken setup에는 extra headers가 필요하지 않습니다. 다른 gateway가 명시적으로 요구할 때만 tenant, routing 또는 audit headers를 추가하세요.

### pricing과 usage는 어디에서 확인할 수 있나요?

현재 model pricing은 live <a href={"https://bettertoken.ai/pricing"}>모델 광장</a>에서 확인하세요. request usage와 balance는 BetterToken Dashboard에서 볼 수 있습니다.

### 관련 FAQ

* [OpenAI-compatible API와 Anthropic-compatible API 비교](/ko/faq/concepts/openai-compatible-vs-anthropic-compatible)
* [MCP와 API Key 및 Base URL 비교](/ko/faq/concepts/mcp-vs-api-key-base-url)
* [model\_provider, base\_url 및 wire\_api란 무엇인가요?](/ko/faq/codex/model-provider-base-url-wire-api)
* [Cline에서 OpenAI-compatible API 구성](/ko/faq/cline/openai-compatible-api)

## Advanced setup

## 지원 Provider

| Provider | 상태      |
| -------- | ------- |
| Claude   | 지원되지 않음 |
| GPT      | 수동 설정   |
| Kimi     | 수동 설정   |
| GLM      | 수동 설정   |

<Note>표시된 상태는 이 페이지에서 설명하는 BetterToken 설정 방식에 적용됩니다.</Note>

<Accordion title="설정 방식 설명">
  * **수동 설정**: API Key, Base URL, Model을 입력하세요.
  * **지원되지 않음**: 검증된 직접 연결 방식이 아직 없습니다.
</Accordion>

### 관련 가이드

* [Factory BYOK 개요](https://docs.factory.ai/cli/byok/overview)

## 기술 세부 정보

<Accordion title="Protocol, endpoint 및 내부 provider 필드">
  이 설정은 `https://www.bettertoken.ai/v1`을 사용합니다. 도구가 OpenAI-compatible endpoint path를 추가합니다. 특정 field에서 명시적으로 요구하지 않는 한 `/chat/completions` 또는 `/responses`를 추가하지 마세요.
</Accordion>
