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

# Codex

> Configure Codex to call GPT-series LinkModel chat models with the Responses API wire protocol.

Codex should use LinkModel's Responses-compatible endpoint. Use GPT-series LinkModel models only.

## Configure

Set your LinkModel API key:

```bash theme={null}
export LINKMODEL_API_KEY="<YOUR_API_KEY>"
```

Add a LinkModel provider to `~/.codex/config.toml`:

```toml theme={null}
model = "gpt-5.3-codex"
model_provider = "linkmodel"

[model_providers.linkmodel]
name = "LinkModel"
base_url = "https://api.linkmodel.ai/v1"
env_key = "LINKMODEL_API_KEY"
wire_api = "responses"
```

Start Codex:

```bash theme={null}
codex
```

## Recommended Models

Use GPT-series models that are exposed on the [Responses endpoint](/api-reference/chat/openai-responses):

| Model           | Use case                                  |
| --------------- | ----------------------------------------- |
| `gpt-5.3-codex` | Agentic coding and Codex workflows.       |
| `gpt-5.6-sol`   | GPT reasoning and coding workflows.       |
| `gpt-5`         | General GPT chat and reasoning workflows. |

## Verify

Open `/status` in Codex and confirm the active provider is `linkmodel`.

If Codex does not pick up shell environment variables, put the key in `~/.codex/.env`:

```text theme={null}
LINKMODEL_API_KEY=<YOUR_API_KEY>
```

Restart Codex after changing `~/.codex/config.toml` or `~/.codex/.env`.

## Official Reference

* [OpenAI Codex repository](https://github.com/openai/codex)
* [Codex model provider source](https://github.com/openai/codex/blob/main/codex-rs/model-provider-info/src/lib.rs)
