Codex 빠른 시작
Windows, macOS 또는 Linux에 Codex를 설치하고 Modelflare API 키를 연결한 뒤 Responses API 요청을 확인합니다.
이 가이드에서는 Codex를 Modelflare에 연결하고 첫 번째 요청을 실행합니다. 자동 설정을 위해서는 옵션 A를 사용하세요. 옵션 B를 사용하여 먼저 Codex를 설치한 다음 필요한 각 파일을 직접 생성하십시오.
1. API 키 만들기
Modelflare 콘솔에 로그인하고 API 키를 열고 gpt-5.6-sol에 액세스할 수 있는 키를 생성합니다. 모델을 나열하는 사용 가능한 기본이 아닌 그룹을 선택하십시오. 단일 필수 그룹은 없습니다.
열쇠를 준비하세요. 설치 프로그램을 사용하거나 동일한 파일을 수동으로 구성할 수 있습니다.
2. 설정 방법을 선택하세요
옵션 A: 설치 프로그램 실행
macOS 또는 Linux
일반 사용자로 다음 명령을 실행하세요.
curl -fsSL https://modelflare.dev/install/codex.sh | sh
VPS 또는 컨테이너에 이미 root로 로그인한 경우 다음을 사용하세요.
curl -fsSL https://modelflare.dev/install/codex.sh | MODELFLARE_ALLOW_ROOT=1 sh
일반 개인용 컴퓨터에는 sudo를 추가하지 마십시오. 스크립트는 Codex를 설치 또는 업데이트하고, 기존 파일을 백업하고, Modelflare API 키를 요청하고, ~/.codex 아래에 공급자 구성을 작성합니다.
Windows PowerShell
일반 Windows 사용자로 PowerShell를 열고 다음을 실행합니다.
irm https://modelflare.dev/install/codex.ps1 | iex
설치 프로그램은 언어와 Modelflare API 키를 요청하고, gpt-5.6-sol에 대한 액세스를 확인하고, 기존 파일을 변경하기 전에 백업합니다. 완료되면 계속해서 연결 확인을 진행하세요.
옵션 B: 각 Codex 파일을 직접 생성
Modelflare 설정 스크립트를 실행하지 않으려는 경우 이 옵션을 사용하십시오. 순서대로 단계를 따르고 모든 단계에서 운영 체제에 맞는 명령 블록을 사용하십시오.
옵션 B는 사용자 수준 .codex 디렉터리 아래에 두 개의 파일(config.toml 및 modelflare_api_key)을 생성합니다.
1단계: Codex CLI 설치
Windows PowerShell
irm https://chatgpt.com/codex/install.ps1 | iex
codex --version
Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex --version
macOS
curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex --version
2단계: .codex 디렉터리 생성 및 입력
Windows PowerShell
New-Item -ItemType Directory -Force "$HOME\.codex" | Out-Null
Set-Location "$HOME\.codex"
Linux
mkdir -p ~/.codex
cd ~/.codex
macOS
mkdir -p ~/.codex
cd ~/.codex
3단계: config.toml 생성
Windows PowerShell
$config = @'
model_provider = "modelflare"
model = "gpt-5.6-sol"
model_reasoning_effort = "xhigh"
disable_response_storage = true
model_supports_reasoning_summaries = true
[model_providers.modelflare]
name = "Modelflare"
base_url = "https://modelflare.dev/v1"
wire_api = "responses"
[model_providers.modelflare.auth]
command = "powershell.exe"
args = ["-NoProfile", "-NonInteractive", "-Command", "Get-Content -LiteralPath (Join-Path (Join-Path $HOME '.codex') 'modelflare_api_key') -Raw"]
'@
$utf8NoBom = New-Object System.Text.UTF8Encoding -ArgumentList $false
[System.IO.File]::WriteAllText(
(Join-Path (Get-Location) "config.toml"),
$config,
$utf8NoBom
)
Linux
cat > config.toml << 'EOF'
model_provider = "modelflare"
model = "gpt-5.6-sol"
model_reasoning_effort = "xhigh"
disable_response_storage = true
model_supports_reasoning_summaries = true
[model_providers.modelflare]
name = "Modelflare"
base_url = "https://modelflare.dev/v1"
wire_api = "responses"
[model_providers.modelflare.auth]
command = "sh"
args = ["-lc", "cat ~/.codex/modelflare_api_key"]
EOF
chmod 600 config.toml
macOS
cat > config.toml << 'EOF'
model_provider = "modelflare"
model = "gpt-5.6-sol"
model_reasoning_effort = "xhigh"
disable_response_storage = true
model_supports_reasoning_summaries = true
[model_providers.modelflare]
name = "Modelflare"
base_url = "https://modelflare.dev/v1"
wire_api = "responses"
[model_providers.modelflare.auth]
command = "sh"
args = ["-lc", "cat ~/.codex/modelflare_api_key"]
EOF
chmod 600 config.toml
4단계: modelflare_api_key 생성
시스템에 대한 명령을 실행하기 전에 YOUR_MODELFLARE_API_KEY를 Modelflare 콘솔에서 생성한 전체 API 키로 바꾸십시오. 파일에는 키 자체만 포함되어야 합니다. 자리 표시자를 유지하거나 따옴표, 백틱 또는 공백을 추가하지 마십시오.
Windows PowerShell
$apiKey = @'
YOUR_MODELFLARE_API_KEY
'@
$apiKey = $apiKey.Trim()
$utf8NoBom = New-Object System.Text.UTF8Encoding -ArgumentList $false
[System.IO.File]::WriteAllText(
(Join-Path (Get-Location) "modelflare_api_key"),
$apiKey,
$utf8NoBom
)
$apiKey = $null
Linux
cat > modelflare_api_key << 'EOF'
YOUR_MODELFLARE_API_KEY
EOF
chmod 600 modelflare_api_key
macOS
cat > modelflare_api_key << 'EOF'
YOUR_MODELFLARE_API_KEY
EOF
chmod 600 modelflare_api_key
5단계: Codex 시작
Windows PowerShell
Set-Location $HOME
New-Item -ItemType Directory -Force "my-codex-project" | Out-Null
Set-Location "my-codex-project"
codex --model gpt-5.6-sol
Linux
cd ~
mkdir -p my-codex-project
cd my-codex-project
codex --model gpt-5.6-sol
macOS
cd ~
mkdir -p my-codex-project
cd my-codex-project
codex --model gpt-5.6-sol
3. 연결 확인
설치 프로그램을 사용한 경우 이미 열려 있는 Codex CLI, IDE 또는 데스크톱 세션을 완전히 닫습니다. 새 터미널을 열고 프로젝트 디렉터리를 입력한 후 다음을 실행합니다.
codex --model gpt-5.6-sol
그런 다음 Codex에게 질문하세요.
활성 모델과 제공자를 확인하는 한 문장으로 답장하세요.
정상적인 응답은 설정이 완료되었음을 의미합니다.
일반적인 문제
| 증상 | 해야 할 일 |
|---|---|
| 401 | API 키를 다시 복사하고 삭제되거나 비활성화되지 않았는지 확인하세요. |
| model_not_found | API 키를 편집하고 gpt-5.6-sol에 액세스할 수 있는 그룹을 선택하세요. |
| ChatGPT 로그인이 나타납니다 | 모든 Codex 세션을 완전히 종료하고 CLI를 다시 엽니다. |
| codex를 찾을 수 없습니다 | 새 터미널을 엽니다. Windows에서는 codex.cmd를 사용해 보세요. |