> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.asi1.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.asi1.ai/_mcp/server.

# Set Up ASI:One in Codex

> Run asi1-ultra in the Codex CLI, while plain codex stays on your OpenAI account.

## Overview

The [Codex CLI](https://developers.openai.com/codex/cli) lets you use your ASI:One subscription and any of the ASI:One models in your existing Codex workflows.

## Prerequisites

* macOS or Linux. The profile reads your key with `printf`, which native Windows
  doesn't have.
* The Codex CLI installed and on your `PATH`.
* An ASI:One API key. Create one at [asi1.ai/developer](https://asi1.ai/developer).
  Keys start with `sk_`.
* An ASI:One plan that includes `asi1-ultra`. The same key also works for `asi1`
  and `asi1-mini`.

## Create the profile

The profile will hold your key, so create the file readable only by you before
adding anything to it:

```bash
mkdir -p ~/.codex && touch ~/.codex/asi.config.toml && chmod 600 ~/.codex/asi.config.toml
```

Open `~/.codex/asi.config.toml` in an editor, paste the following, and replace
`sk_YOUR_KEY_HERE` with your key:

```toml
model = "asi1-ultra"
model_provider = "asi"
web_search = "disabled"

[model_providers.asi]
name = "ASI:One"
base_url = "https://api.asi1.ai/v1"
wire_api = "responses"

[model_providers.asi.auth]
command = "printf"
args = ["sk_YOUR_KEY_HERE"]
```

Codex loads each model's context window from ASI:One when it starts, so the profile
doesn't need one.

## Run it

To check the connection without opening a session:

```bash
codex exec -p asi -m asi1-mini "Reply with exactly: pong"
```

Then start a session:

```bash
codex -p asi
```

To use a different ASI:One model, pass it with `-m`:

```bash
codex -p asi -m asi1-mini
```

## Troubleshooting

| Symptom                                                     | Cause and fix                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400 web_search tool does not support: external_web_access` | `web_search = "disabled"` is missing from the profile.                                                                                                                                                                                                                                         |
| `404` model not found                                       | A model other than `asi1`, `asi1-ultra` or `asi1-mini` was chosen with `/model`, or the name is misspelled. Restart with `codex -p asi -m <model>`.                                                                                                                                            |
| `400` on the reasoning effort                               | ASI:One takes OpenAI's effort values: `none`, `minimal`, `low`, `medium`, `high` and `xhigh`. Set `model_reasoning_effort` in the profile to one of those, or to `low`, `medium` or `high` to match the [depth scale](/documentation/build-with-asi-one/reasoning#choosing-a-reasoning-depth). |
| `401`                                                       | The key in `args` is wrong or has been revoked. Create a new one at [asi1.ai/developer](https://asi1.ai/developer).                                                                                                                                                                            |
| Plain `codex` now uses ASI:One                              | The ASI:One settings ended up in `~/.codex/config.toml`. Move them back to `~/.codex/asi.config.toml`.                                                                                                                                                                                         |

## Next steps

1. **[Cursor](/documentation/coding/cursor)**: the same models in the Cursor editor
2. **[Zed](/documentation/coding/zed)**: the same models in the Zed editor
3. **[T3 Code](/documentation/coding/t3-code)**: run this Codex setup from the T3 Code app
4. **[OpenCode](/documentation/coding/opencode)**: the same models in OpenCode
5. **[ASI:One Models](/documentation/models)**: choosing between `asi1`, `asi1-ultra` and `asi1-mini`
6. **[Responses API](/documentation/build-with-asi-one/responses)**: the endpoint Codex talks to