https://apistack.vn/v1

← All applications · Connect apps section on /docs

OpenAIconfigure codex

Codex CLI

Also known as: codex · OpenAI Codex CLI

Codex CLI: hướng dẫn cấu hình khóa API, model và nhà cung cấp trong terminal.

Published instructions · Checked version: 0.163.0-alpha.10.2 · Checked on:

The real application was run against a local mock API to check connection settings, authentication and streaming responses. Production, all features, plugins and operating systems have not been verified.

Chat, ping, invoke and content-generation examples may send real billable requests. Check the model, balance, rate and minimum before running them. GET /v1/models checks authentication and the catalogue only. Set up environment variables safely

Base URL to paste

OpenAI SDKs generally use a URL ending in /v1; Anthropic SDKs use the root URL. Avoid adding /v1 twice. Protocol compatibility does not guarantee every provider feature.

https://apistack.vn/v1

Prerequisites

  1. Đã cài `codex`
  2. API key API Stack
  3. Biến API_KEY (khuyến nghị)

Recommended model: gpt-5.6-sol

Quick way — command / config

npm install -g API CLI@latest
api-cli configure codex -m gpt-5.6-sol
export API_KEY='sk-stk-...'
codex

Where to place file / fill Settings

Filemacos
~/.codex/config.toml
Nội dung như snippet config.toml. Không để base_url thiếu /v1.
Filelinux
~/.codex/config.toml
Giống macOS.
Filewindows
%USERPROFILE%\.codex\config.toml
Tạo thư mục `.codex` nếu chưa có; paste TOML; setx API_KEY.

Verify connection

  1. `codex` chạy và trả lời một câu ngắn.
  2. Dashboard → Sử dụng.

Troubleshooting

SymptomReasonHow to handle
404base_url thiếu /v1.base_url = "https://apistack.vn/v1"
Missing API keyenv_key API_KEY chưa export.export/setx API_KEY rồi mở terminal mới.

Notes

  • Codex App (GUI) thường dùng cùng ~/.codex — xem trang codex-app.

Related

Codex App · OpenCode · API CLI

Support