# T3 Code

Run T3 Code on Boundless models: the Codex config it reads, why the key goes in .env, thread titles and common errors.


T3 Code runs your own `codex` binary, which reads `~/.codex/config.toml`. You set up Codex for Boundless, and T3 Code follows.

## Install

Install T3 Code from its own documentation first. Then pick one way to point it at Boundless.

Run this in a terminal on macOS or Linux and choose **T3 Code**:

```bash
curl -fsSL https://boundless.md/install | sh
```

Or run the package yourself, which also works on Windows:

```bash
npx -y @boundless.md/setup@latest
```

Setup signs you in through your browser, creates a key on your account and backs up every file it changes. To undo it, run `curl -fsSL https://boundless.md/install | sh -s -- --revert`. Need a key to configure by hand? Create one in [API Keys](https://inference.boundless.network/settings/api-keys). Setup writes all three files below when you choose **T3 Code**.

## Configure

### T3 Code

T3 Code runs your own `codex` binary, which reads `~/.codex/config.toml`. Set up Codex as on the [Codex app](https://inference.boundless.network/docs/harness-codex-app) page:

```toml
model = "deepseek/deepseek-v4.1-flash"
model_provider = "boundless"

[model_providers.boundless]
name = "Boundless"
base_url = "https://api.inference.boundless.network/v1"
env_key = "BOUNDLESS_API_KEY"
wire_api = "responses"
```

T3 Code passes only a few variables from your shell profile to Codex, so put the key in `~/.codex/.env`:

```bash
echo 'BOUNDLESS_API_KEY=YOUR_API_KEY' >> ~/.codex/.env
```

T3 Code writes thread titles, branch names and commit messages with an OpenAI model through Codex. Point that at Boundless in `~/.t3/userdata/settings.json`, which T3 Code reloads when the file changes:

```json
{
  "textGenerationModelSelection": { "instanceId": "codex", "model": "deepseek/deepseek-v4.1-flash" }
}
```

Start a new thread and pick the model under **Codex**. This is the same configuration the Codex CLI, app and IDE extensions read, so they move to Boundless too, and T3 Code's Codex menu lists only Boundless models. T3 Code's other providers use whatever their own CLIs are configured for. The [setup command](https://inference.boundless.network/docs/coding-agents-and-harnesses#set-up-with-one-command) writes all three files when you choose **T3 Code**.

## Model ids

The examples use `deepseek/deepseek-v4.1-flash`. Use any id from `GET https://api.inference.boundless.network/v1/models`; the [models page](https://inference.boundless.network/models) lists each one with its price and limits.

## Verify

Start a new thread, pick the model under **Codex**, then send a short message and check that a reply comes back.

To check the base URL and key on their own, list the models the gateway serves. A list of models means both are right. A `401` means the key is missing or wrong:

```bash
curl https://api.inference.boundless.network/v1/models -H "Authorization: Bearer YOUR_API_KEY"
```

## Common errors

| What you see | What it usually is |
| --- | --- |
| `401` on every request | The key is not in `~/.codex/.env`. T3 Code passes only a few variables from your shell profile to Codex. |
| An error naming a model you never chose | The harness is sending its default. Set the model explicitly, including any small or background slot. |
| `403` with `model_not_allowed` | Your team admin has not enabled that model for you. Ask them, or pick another. See [Model access](https://inference.boundless.network/docs/teams#model-access). |

Every status and code is on the [Errors](https://inference.boundless.network/docs/errors) page. Other harnesses are on the [Coding Agents & Harnesses](https://inference.boundless.network/docs/coding-agents-and-harnesses) page.
