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

# Cursor on Layer X1.

> Cursor's models settings accept an OpenAI-compatible override — point the OpenAI base URL at the gateway, paste your key, and add lx1 model names.

## Configure

In `Cursor Settings → Models`:

* Enable **Override OpenAI Base URL** and set it to:

```
https://api.layerx1.com/v1
```

* Paste your `lx1_` key into the **OpenAI API Key** field.
* Under model names, add a **custom model** for each catalog id you want to use — e.g.
  `lx1-gpt-oss-120b`, `lx1-glm-5`, `lx1-sonnet-4.6`.
* Click **Verify** — Cursor sends a probe to `/v1/chat/completions` and should turn green.

## Troubleshooting

* **Verify fails?** The base URL must end in `/v1` and at least one custom model name must
  be a valid [catalog id](/models) — Cursor verifies with the model currently selected.
* **Model "not found"?** Model names are exact — `lx1-glm-5`, not `glm-5`. Copy ids from
  the catalog page.
* **Built-in models stopped working?** Expected: overriding the OpenAI base URL points
  Cursor's OpenAI slot at Layer X1. Toggle the override off to switch back.

<Note>
  Cursor uses its own accounts for some built-in features; the override governs the
  chat/composer models you add by name. Every lx1 model you add is included in your plan —
  pick per task, not per budget.
</Note>

## Cursor CLI (`agent`)

Cursor Agent CLI (`agent` / `cursor agent`) does **not** support BYOK or a custom
OpenAI-compatible base URL — it only talks to Cursor Cloud under your Cursor account.
There is no config file the installer can write.

```sh theme={null}
npx layerx1 setup --tool cursor-cli --key lx1_your_key
```

prints the IDE override above and a one-liner for a terminal agent Layer X1 **can**
configure (`hermes`, `codex`, `claude-code`).
