AIO Sandbox includes the OpenAI Codex CLI. Codex is a terminal-first AI coding agent, so you can run it directly inside the sandbox or launch it through the built-in terminal page.
http://localhost:8080/codex to redirect to the built-in terminal and start codexcodex inside the containerYou can generate the Codex configuration at container startup with environment variables:
| Variable | Default | Description |
|---|---|---|
CODEX_API_KEY | None | General API key, recommended for Responses-compatible gateways |
ARK_API_KEY | None | Compatible with existing Volcengine Ark API key setups |
OPENAI_API_KEY | None | Official OpenAI API key |
CODEX_MODEL | deepseek-v4-flash-260425 | Model ID written in custom provider mode |
CODEX_BASE_URL | https://ark.cn-beijing.volces.com/api/v3 | Responses API endpoint written in custom provider mode |
CODEX_CONFIG_TOML | None | Full custom config.toml content; highest priority |
CODEX_MODEL_CATALOG_JSON | None | Optional model catalog JSON written to ~/.codex/model-catalog.json |
For most setups, prefer CODEX_API_KEY.
Official OpenAI API:
Other Responses-compatible endpoint:
Fully custom Codex configuration:
Use CODEX_CONFIG_TOML when you need to provide any Codex-supported config.toml fields. Prefer referencing the API key through env_key instead of writing the secret value directly into TOML.
At startup, AIO Sandbox generates config.toml in this order:
CODEX_CONFIG_TOMLCODEX_API_KEY / ARK_API_KEY / OPENAI_API_KEYWhen auto-generating the config, AIO Sandbox selects the API key in this order:
CODEX_API_KEYARK_API_KEYOPENAI_API_KEYIf no API key is available, AIO Sandbox does not generate or overwrite Codex configuration.
CODEX_CONFIG_TOML is validated as TOML, and CODEX_MODEL_CATALOG_JSON is validated as JSON. If validation fails, startup exits with an explicit error instead of silently falling back to another configuration.
After startup, you can edit ~/.codex/config.toml directly. If the container is restarted with CODEX_CONFIG_TOML or one of the API key environment variables above, the startup script regenerates the configuration. To keep manual edits, restart without those environment variables.