Set Up ASI:One in Codex

Overview

The 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. Keys start with sk_.
  • An ASI:One plan that includes asi1-ultra. The same key also works for asi1, asi1-ultra-1m 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:

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:

model = "asi1-ultra"
model_provider = "asi"
model_context_window = 196000
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"]

Run it

To check the connection without opening a session:

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

Then start a session:

codex -p asi

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

codex -p asi -m asi1-mini

asi1-ultra-1m has a much larger context window than the profile’s model_context_window. Raise it for that session so Codex doesn’t compact at 196,000 tokens:

codex -p asi -m asi1-ultra-1m -c model_context_window=1000000

Troubleshooting

SymptomCause and fix
context_length_exceeded, or stream disconnected before completion after several reconnectsmodel_context_window is missing from the profile. Add it.
400 tool type 'web_search' is not supportedweb_search = "disabled" is missing from the profile.
404 model not foundA model was chosen with /model, or the name is misspelled. Restart with codex -p asi -m <model>.
400 on the reasoning effortASI:One accepts none, minimal, low, medium and high, not xhigh. Set model_reasoning_effort in the profile to one of those. See Reasoning.
401The key in args is wrong or has been revoked. Create a new one at asi1.ai/developer.
Plain codex now uses ASI:OneThe ASI:One settings ended up in ~/.codex/config.toml. Move them back to ~/.codex/asi.config.toml.

Next steps

  1. Cursor: the same models in the Cursor editor
  2. T3 Code: run this Codex setup from the T3 Code app
  3. OpenCode: the same models in OpenCode
  4. ASI:One Models: choosing between asi1, asi1-ultra, asi1-ultra-1m and asi1-mini
  5. Responses API: the endpoint Codex talks to