# Codex with Keln
Codex runs on Keln in the ChatGPT desktop app and in the `codex` command line. Pointed at Keln, it
lists the open models in its own model picker, each with effort levels. Your ChatGPT sign-in is
untouched, and you can switch back whenever you want.
To use Keln from code instead, see the [Responses API](api/responses.md),
[chat completions](api/chat-completions.md), or the [Anthropic-compatible API](api/anthropic.md).
## What you need to start
- The ChatGPT desktop app for macOS, with Codex 0.156 or later (update the app if it is older).
- A Keln API key. Sign up at [app.keln.ai](https://app.keln.ai), then open **Keys** →
**Create key**.
- Credit on your Keln account. **Billing** → **Add credit**.
## Connect Codex to Keln
### 1. Point Codex at Keln
Open `~/.codex/config.toml` (create it if it does not exist). Add these two lines at the very top
of the file:
```toml
# Keln
model_provider = "keln"
```
And add this block at the very end of the file:
```toml
[model_providers.keln]
name = "Keln"
base_url = "https://api.keln.ai/v1"
model_catalog_url = "https://api.keln.ai/v1/codex/models"
experimental_bearer_token = "sk-keln-…" # your key
[features]
api_key_model_discovery = true
```
Replace `sk-keln-…` with your Keln API key. If the file already has a `[features]` section, put the
`api_key_model_discovery` line in it instead. The app does not
read shell variables, so the key has to live in the file. Keep the file private:
```bash
chmod 600 ~/.codex/config.toml
```
### 2. Reopen ChatGPT
Quit and reopen the app. Codex reads the file at startup. Open **Codex** from the sidebar. The
message box shows the model and effort, and the account menu at the bottom of the sidebar reads
**Keln**.
<figure class="kd-figure" markdown>
{ loading=lazy }
</figure>
<figure class="kd-figure" markdown>
{ loading=lazy }
</figure>
### 3. Pick a model and effort
Click the model chip in the message box. The slider sets the effort; click the model name for the
list.
<figure class="kd-figure" markdown>
{ loading=lazy }
</figure>
<figure class="kd-figure" markdown>
{ loading=lazy }
</figure>
## Models and features
| Model | Role | Input |
|---|---|---|
| GLM 5.3 | Frontier | text |
| Kimi K3.1 Pro | Frontier | text + images |
| DeepSeek V4 Pro | Frontier | text |
| GLM 5.3 Flash | Flash | text + images |
| DeepSeek V4.1 Flash 1017 | Flash | text + images |
- **Effort levels.** Low, High and Extra High, from the slider in the message box. DeepSeek V4 Pro
has High and Extra High only.
- **Web search.** Codex's search runs on Keln, server side, priced per search
([pricing](models-pricing.md#web-search), [details](capabilities/web-search.md)).
- **Zero data retention**, the same privacy contract as the API
([Privacy & zero data retention](capabilities/privacy.md)).
Keln adds models over time. To ask for one, open [**Model catalog**](https://app.keln.ai/models) in the portal and send a model
request.
## Codex on the command line
The same `config.toml` drives the `codex` command. On the command line the key can come from
your shell instead of the file. Replace the `experimental_bearer_token` line with
`env_key = "KELN_API_KEY"`, then run `export KELN_API_KEY=sk-keln-…`.
## Switch between Keln and ChatGPT
To go back to ChatGPT, comment out the `model_provider` line at the top of `config.toml` and
reopen the app. Uncomment it to return to Keln.
To give Codex sandboxes and web search as tools, add Keln's [MCP server](mcp.md#codex).
Using Claude Desktop instead? See [Claude Desktop with Keln](claude-desktop.md).
Codex with Keln
Codex runs on Keln in the ChatGPT desktop app and in the codex command line. Pointed at Keln, it
lists the open models in its own model picker, each with effort levels. Your ChatGPT sign-in is
untouched, and you can switch back whenever you want.
The ChatGPT desktop app for macOS, with Codex 0.156 or later (update the app if it is older).
A Keln API key. Sign up at app.keln.ai, then open Keys →
Create key.
Credit on your Keln account. Billing → Add credit.
Connect Codex to Keln
1. Point Codex at Keln
Open ~/.codex/config.toml (create it if it does not exist). Add these two lines at the very top
of the file:
# Kelnmodel_provider="keln"
And add this block at the very end of the file:
[model_providers.keln]name="Keln"base_url="https://api.keln.ai/v1"model_catalog_url="https://api.keln.ai/v1/codex/models"experimental_bearer_token="sk-keln-…"# your key[features]api_key_model_discovery=true
Replace sk-keln-… with your Keln API key. If the file already has a [features] section, put the
api_key_model_discovery line in it instead. The app does not
read shell variables, so the key has to live in the file. Keep the file private:
chmod600~/.codex/config.toml
2. Reopen ChatGPT
Quit and reopen the app. Codex reads the file at startup. Open Codex from the sidebar. The
message box shows the model and effort, and the account menu at the bottom of the sidebar reads
Keln.
3. Pick a model and effort
Click the model chip in the message box. The slider sets the effort; click the model name for the
list.
Models and features
Model
Role
Input
GLM 5.3
Frontier
text
Kimi K3.1 Pro
Frontier
text + images
DeepSeek V4 Pro
Frontier
text
GLM 5.3 Flash
Flash
text + images
DeepSeek V4.1 Flash 1017
Flash
text + images
Effort levels. Low, High and Extra High, from the slider in the message box. DeepSeek V4 Pro
has High and Extra High only.
Web search. Codex's search runs on Keln, server side, priced per search
(pricing, details).
Keln adds models over time. To ask for one, open Model catalog in the portal and send a model
request.
Codex on the command line
The same config.toml drives the codex command. On the command line the key can come from
your shell instead of the file. Replace the experimental_bearer_token line with
env_key = "KELN_API_KEY", then run export KELN_API_KEY=sk-keln-….
Switch between Keln and ChatGPT
To go back to ChatGPT, comment out the model_provider line at the top of config.toml and
reopen the app. Uncomment it to return to Keln.
To give Codex sandboxes and web search as tools, add Keln's MCP server.