> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dari.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Run Codex through a Dari Router.

Create a [Routing API key](/api-keys#create-a-routing-key):

```bash theme={null}
export DARI_ROUTING_API_KEY="dari_..."
```

With Codex 0.134.0 or later, create `~/.codex/dari.config.toml`. The `dari` filename matches the profile name used below:

```toml theme={null}
model = "dari/routing"
model_provider = "dari"
model_reasoning_summary = "none"

[model_providers.dari]
name = "Dari"
base_url = "https://routing.dari.dev/v1"
env_key = "DARI_ROUTING_API_KEY"
wire_api = "responses"
```

```bash theme={null}
codex --profile dari
```

Codex sends Responses requests through your organization's default router at `/v1`. `model_reasoning_summary = "none"` prevents Codex from requesting a summary that the router does not expose. The router chooses from its current managed model set. Omit `model_reasoning_effort` to let Dari choose the reasoning level, then check **Activity** in the dashboard to see each selection.

To use a different model set, edit the default router or [Create A Router](/router/create-a-router) with public or [Custom Models](/router/configure-models#custom-models). Set that router as the default to keep this same configuration, or point `base_url` at `https://routing.dari.dev/{router_id}/v1`.
