Codex CLI on Muapi
Configuration
~/.codex/config.toml (macOS/Linux) or %USERPROFILE%\.codex\config.toml (Windows):
model = "gpt-5-6-sol"
model_provider = "muapi"
[model_providers.muapi]
name = "Muapi"
base_url = "https://api.muapi.ai/openai/v1"
env_key = "MUAPI_API_KEY"
wire_api = "responses"
API key
macOS/Linux:
export MUAPI_API_KEY=your_key
Windows PowerShell:
$env:MUAPI_API_KEY = "your_key"
setx MUAPI_API_KEY "your_key"
Key details
base_urlis the root; Codex appends/responses.env_keynames the variable holding the key, not the key itself.- Set
modelexplicitly to an id from the models endpoint, not Codex's built-in default. - Provider ids
openai,ollamaandlmstudioare reserved; usemuapi. - Keep provider config in the user-level file, not in project files.
Models
curl -s -H "Authorization: Bearer $MUAPI_API_KEY" https://api.muapi.ai/openai/v1/models
Unrestricted (abliterated) models
The models endpoint also lists Muapi's tool-capable unrestricted models (for example qwen-3-8-27b-obliterated, mimo-v2-6-flash-abliterated). Set model = "<id>" in config.toml to use one; Muapi translates between Codex's protocol and the model's chat API for you.
- Experimental: quality varies by model, and smaller models can skip steps on multi-file tasks.
- There is no prompt caching, so every turn is billed for the whole conversation so far.
- Output per response is capped at 16,384 tokens, and context windows are smaller than GPT's.
- Codex must send the full conversation each turn (its default for custom providers). Requests that rely on
previous_response_idare rejected with a clear error. - Built-in Codex tools other than shell-style function tools and
apply_patch(for example web search) are not available on these models.
Reasoning effort (optional)
model_reasoning_effort = "high"
Verify
codex doctor