Codex CLI BYOK: your own API key, local models and an alternative
Yes, Codex CLI supports BYOK: sign in with an OpenAI API key, add other providers or run local models. What each route covers, and More AI as an alternative.
| If you want | Use |
|---|---|
| Codex on an OpenAI API key instead of a ChatGPT plan | Codex CLI: codex login --with-api-key |
| Another provider or a company gateway | Codex CLI: model_providers in ~/.codex/config.toml |
| Local models through Ollama or LM Studio | Codex CLI: --oss |
| Codex cloud tasks | ChatGPT sign-in; an API key doesn’t cover them |
| Several providers in one desktop app, with documents next to code | More AI |
Updated October 23, 2026
Written by the More AI team. Competitor product documentation reviewed on October 23, 2026; no head-to-head performance benchmark was run. Plans, previews and model availability can change.
Yes, Codex CLI supports BYOK. An OpenAI API key is billed at standard API rates through your OpenAI Platform account instead of your ChatGPT plan, and the ChatGPT desktop app and the IDE extension accept the same key for local work. Other providers and local models are documented configuration. The limit is Codex cloud, which needs ChatGPT sign-in. If BYOK is all you need, stay with Codex; More AI is for a different reason.
Workflow and cost comparison
| More AI | Codex CLI | |
|---|---|---|
| Interface | Desktop app for macOS, Windows and Linux; web app; terminal agent (npm beta) | CLI; the wider product has desktop, IDE and cloud surfaces |
| Model access | Keys for several supported providers side by side; local models and compatible endpoints | OpenAI access, configurable providers and local OSS mode |
| Cost model | Free app; tokens at your provider’s price; cloud free during the beta | ChatGPT access or API billing; custom provider/local conditions depend on setup |
| Work scope | Home for documents and research; Code for repositories | Terminal coding agent: interactive, review and scripted runs |
What does Codex CLI cover?
Codex CLI is OpenAI’s open-source (Apache-2.0) coding agent for a local repository: interactive work, review and scripted runs. The wider Codex product also lives in the ChatGPT desktop app, IDE extensions and the cloud. This page compares the CLI and does not claim those surfaces lack graphical or document workflows.
More AI is a free desktop agent for macOS, Windows and Linux built around your own keys: add several supported providers or a local model and choose per task. Home handles documents and research, Code handles repositories. An optional sign-in adds synced work in the web app, and More AI Code brings the agent to the terminal as an npm beta. More AI is proprietary.
Models, access and total cost
For an OpenAI key already set privately as OPENAI_API_KEY, the documented macOS/Linux command is printenv OPENAI_API_KEY | codex login --with-api-key. Check codex login status next. For a different provider, use user-level ~/.codex/config.toml to select model_provider and configure its model, base URL and authentication. For a prepared local runtime, choose --oss --local-provider ollama or --oss --local-provider lmstudio. Follow the official references below for your platform and protocol; a successful login does not establish model or tool compatibility.
BYOK in More AI works like Codex’s API-key route: the provider bills you at its API price and More AI adds no markup. The difference is breadth inside one app — keys for several supported providers side by side, plus local models and compatible endpoints — not access Codex lacks. The app is free and an account is optional for local work; the cloud subscription pays for execution and access, not tokens, and is free during the beta.
How the work gets done
The CLI fits repeatable terminal work and code review. More AI’s proposed advantage is the particular way its Home and Code workspaces fit your tasks and provider budgeting. It is not exclusive access to a GUI, cloud execution or non-OpenAI models.
When to choose Codex CLI
Choose Codex CLI when terminal automation, review commands and your existing OpenAI workflow already meet the requirement. Before switching because of billing or provider restrictions, inspect its current API-key and custom-provider configuration; the restriction may be configuration-specific.
When More AI is worth trying
Try More AI when its supported provider setup and document/repository organization address a recurring task you find awkward elsewhere. Compare the same model where possible, but also test the intended production configuration. A matching model name does not reproduce the agent’s context and tools. Separately, running Codex itself inside More AI’s Code workspace — with More AI’s permissions, browser and connectors around it — is in testing and ships in full with the next app update.
A practical trial before switching
Use a disposable copy of a real task and decide the acceptance criteria before starting. The following is a proposed test, not a claimed benchmark result.
- Record codex --version, authentication method, model/provider and a clean repository commit. Set a small provider budget and specify allowed files and one test command before either agent starts.
- Ask for a read-only explanation of one failing test; then allow a minimal patch and run the test. Check the actual diff and output. Treat authentication, protocol or tool errors separately from a wrong solution, and stop repeated attempts that make no progress.
- Repeat from the same snapshot in More AI Code. Record whether usage came from a plan, API key or local runtime, all attempts and manual corrections. Compare accepted changes and documented cost; an unmeasured or unavailable price is unknown, not zero.
- Record app version, model/provider, settings, elapsed time, total API cost, retries and manual fixes. Inspect the final artifact; a completed run alone is not proof of a correct result.
More AI accounts and data handling
An account is optional for supported local desktop BYOK or local-model work. Signed-out work is not synced. After sign-in, supported sync categories start enabled in a new installation and can be disabled individually. Cloud execution is a separate control that starts off.
Local copies do not mean all processing stays on-device. Hosted requests go to the selected provider. AI observability can send bounded prompts, responses, reasoning and tool content by default, including BYOK; replay may see rendered content. Disable AI observability and general telemetry in Privacy as needed. A local model alone does not establish a fully offline workflow.
Other Codex CLI alternatives
- OpenCode — open source, any provider, in the terminal, a desktop app or the browser.
- Claude Code — Anthropic’s agent, on a Claude plan or per-token API billing.
- Cline — an editor agent with BYOK, a desktop app and a CLI.
- Aider — Git-focused terminal pair programming with hosted or local models.
Frequently asked questions
Can Codex CLI use custom providers, Ollama or LM Studio?
Yes. Current OpenAI documentation describes custom model providers and local --oss mode with Ollama or LM Studio. Actual capability still depends on protocol, model and configuration; More AI should not be presented as uniquely provider-flexible.
Does Codex CLI support BYOK?
Yes. Pipe an OpenAI API key to codex login --with-api-key, then check codex login status. Usage is billed at standard API rates through your OpenAI Platform account instead of included ChatGPT plan credits, which also makes it the route for CI jobs.
Does an API key work in the Codex app and Codex cloud?
The ChatGPT desktop app, Codex CLI and the IDE extension accept an API key for local work. Codex cloud requires ChatGPT sign-in, and some features that depend on a ChatGPT workspace are limited or unavailable with a key.
Why try More AI if Codex already supports BYOK?
Not for BYOK itself. Try it when you want several providers and local models in one free desktop app, documents and spreadsheets next to repository work, or a web app that shows synced work. Choosing Codex as the agent inside More AI’s Code workspace is in testing and ships in full with the next app update.