> ## Documentation Index
> Fetch the complete documentation index at: https://veniceai-mintlify-6ce01df5.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex CLI

> 로컬 config.toml 파일을 통해 OpenAI Codex CLI를 Venice AI 모델과 함께 사용

이 가이드는 Codex의 공식 구성 경로인 `~/.codex/config.toml`(사용자 수준) 또는 `.codex/config.toml`(프로젝트 수준)을 사용하여 OpenAI Codex CLI를 Venice와 함께 실행하는 방법을 보여줍니다.

<CardGroup cols={3}>
  <Card title="간단한 설정" icon="gear">
    프로젝트의 단일 구성 파일
  </Card>

  <Card title="OpenAI 호환" icon="plug">
    Venice의 OpenAI 호환 API 사용
  </Card>

  <Card title="모델 유연성" icon="microchip">
    지원되는 모든 Venice 텍스트 모델로 전환
  </Card>
</CardGroup>

***

## 사전 요구 사항

* [venice.ai/settings/api](https://venice.ai/settings/api)에서 받은 Venice API 키
* 설치되어 작동 중인 Codex CLI

***

## 설정

<Steps>
  <Step title="프로젝트 구성 경로 생성">
    프로젝트 루트에서:

    ```bash theme={"system"}
    mkdir -p .codex
    ```
  </Step>

  <Step title=".codex/config.toml 생성">
    파일을 만들고 아래 구성을 붙여넣으세요:

    ```toml theme={"system"}
    #:schema https://developers.openai.com/codex/config-schema.json

    model = "openai-gpt-54" # use any Venice model
    model_provider = "venice"
    model_reasoning_effort = "high"
    personality = "pragmatic"
    sandbox_mode = "workspace-write"

    [model_providers.venice]
    name = "Venice"
    base_url = "https://api.venice.ai/api/v1/"
    experimental_bearer_token = "YOUR VENICE API KEY"
    wire_api = "responses"
    ```
  </Step>

  <Step title="두 개의 자리 표시자 교체">
    업데이트:

    * `model`을 사용하려는 Venice 모델 ID로
    * `experimental_bearer_token`을 실제 Venice API 키로

    [텍스트 모델 카탈로그](/models/text)에서 사용 가능한 모델 ID를 찾아볼 수 있습니다.
  </Step>

  <Step title="평소대로 Codex CLI 실행">
    동일한 프로젝트에서 Codex CLI를 시작합니다. 신뢰할 수 있는 프로젝트의 경우 `.codex/config.toml`을 로드하고 Venice를 통해 요청을 라우팅합니다.
  </Step>
</Steps>

***

## 공식 Codex 구성 위치

* **사용자 기본값**: `~/.codex/config.toml`
* **프로젝트 재정의**: `.codex/config.toml` (신뢰할 수 있는 프로젝트에만 로드됨)

Venice 설정을 모든 곳에 적용하려면 동일한 구성을 `~/.codex/config.toml`에 넣으세요.

***

## 구성 우선순위 (가장 높은 것부터)

1. CLI 플래그 및 `--config` 재정의
2. 프로필 값(`--profile <name>`)
3. 프로젝트 구성 레이어(`.codex/config.toml`, 가장 가까운 디렉터리 우선)
4. 사용자 구성(`~/.codex/config.toml`)
5. 시스템 구성(`/etc/codex/config.toml`, Unix)
6. 내장 기본값

***

## 참고 사항

* API 키를 비공개로 유지하고 실제 키를 절대 git에 커밋하지 마세요.
* 프로젝트가 신뢰할 수 없는 것으로 표시되면 Codex는 프로젝트 `.codex/` 구성을 무시합니다.
* 모델을 전환하는 경우 `model` 필드만 업데이트하세요.
* 이 제공자 설정에는 `wire_api = "responses"` 설정이 필요합니다.

***

## 리소스

<CardGroup cols={2}>
  <Card title="Venice API 참조" icon="book" href="/api-reference/api-spec">
    전체 엔드포인트 및 매개변수 문서
  </Card>

  <Card title="Venice 텍스트 모델" icon="list" href="/models/text">
    사용 가능한 모델 ID
  </Card>
</CardGroup>
