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

# Cursor

> Use Edgee with Cursor to access any model through a single API key, with cost tracking and token compression.

Edgee's OpenAI-compatible API works with Cursor, letting you route AI requests through Edgee to gain observability, cut costs, and access any provider's models from one place.

Edgee works with your existing Cursor subscription.

## Edgee CLI setup (recommended)

The fastest way to route Cursor through Edgee is the CLI. It authenticates, starts a local Edgee relay, and opens Cursor routed through it, no manual API key or base URL to configure.

<Steps>
  <Step title="Install the Edgee CLI">
    <Tabs>
      <Tab title="macOS / Linux">
        ```bash theme={"dark"}
        curl -fsSL https://edgee.ai/install.sh | bash

        # Accept the alias prompt (recommended).
        # If skipped: edgee alias
        # Reopen your terminal afterward.
        ```
      </Tab>

      <Tab title="Homebrew (macOS)">
        ```bash theme={"dark"}
        brew install edgee-ai/tap/edgee

        # Enable aliases (recommended).
        edgee alias
        # Reopen your terminal afterward.
        ```
      </Tab>

      <Tab title="Windows (PowerShell)">
        ```powershell theme={"dark"}
        irm https://edgee.ai/install.ps1 | iex

        # Enable aliases (recommended).
        edgee alias
        # Reopen your terminal afterward.
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Launch Cursor through Edgee">
    Choose how you want to launch. Both options route requests through Edgee.

    <Tabs>
      <Tab title="With aliases (recommended)">
        Open **Cursor (Edgee)** from your app menu. The shortcut launches the editor through Edgee. See [desktop shortcuts](/docs/cli/aliases) for supported platforms.
      </Tab>

      <Tab title="Without aliases">
        Launch explicitly through Edgee each time:

        ```bash theme={"dark"}
        edgee launch cursor
        ```

        No alias setup is required.
      </Tab>
    </Tabs>

    If you are not signed in, Edgee starts sign-in automatically at launch. Follow the prompts and select your organization when asked.

    The CLI authenticates, starts a local Edgee relay, and opens Cursor routed through it. Token compression is enabled automatically.
  </Step>
</Steps>

Prefer starting Cursor from your app menu? Install a desktop wrapper once with `edgee alias cursor`, then open **Cursor (Edgee)** like any other app. See the [Edgee CLI](/docs/features/cli) page for details.

## Manual setup (advanced)

### Get your coding-agent key

Manual setup uses the key of your enrolled **Cursor** agent, **not a standard API key** created for LLM Router applications.

1. Open the [Edgee Console](https://www.edgee.ai) and select your organization.
2. In the header, click **Set up coding agent** or **+**, select **Cursor**, and click **Enroll**. If your agent is already enrolled, use its existing icon.
3. Click the agent's icon, then **Advanced settings → Advanced**.
4. Under **Edgee API key (for manual setup)**, click **Reveal key**, then the copy icon.

Use this key wherever the configuration below shows `<YOUR_CODING_AGENT_KEY>`.

### Configure Cursor

You can also point Cursor at Edgee directly through its settings.

<Steps>
  <Step title="Open Cursor Settings">
    In Cursor, go to **Settings → Cursor Settings → Models**.
  </Step>

  <Step title="Configure your API key">
    Scroll down to the **API Keys** section and do the following:

    1. Enable **OpenAI API Key**
    2. Paste the **Cursor coding-agent key** copied above
    3. Enable **Override OpenAI Base URL**
    4. Set the base URL to:

    ```
    https://edgee.io/v1
    ```

    <Note>
      Use the key from your enrolled Cursor agent, retrieved in the steps above.
    </Note>
  </Step>

  <Step title="Add a model">
    Scroll up to **Add or search model** and enter any model from the [Edgee model list](/docs/llm-router/api-reference/models).

    Click **Add**, then toggle it on.

    <Warning>
      You must use model IDs from the Edgee model list. Cursor lets you type any string, but only models supported by Edgee will work.
    </Warning>
  </Step>
</Steps>

You're set. Cursor will now route requests through Edgee.

<Note>
  Token compression is only available when routing through Edgee. You can use your own provider keys via [BYOK](/docs/features/byok) — compression still applies as long as requests go through Edgee.
</Note>

## Next Steps

* Browse the [model list](/docs/llm-router/api-reference/models) to see all available models
* Set up [observability](/docs/features/observability) to monitor usage and costs
* Explore [retry and fallback](/docs/features/retry-and-fallback) for resilient routing

## Verify the connection

Send one request from the configured client, then open **Logs** in the same Edgee organization. Check the served model, provider, and key. For a CLI-launched coding agent, also inspect its session report.

If the request is missing, check that you launched through Edgee or saved the client’s gateway URL and coding-agent key. If it appears with an error, inspect the error before changing settings. See [Troubleshooting](/docs/troubleshooting) and [Gateway errors](/docs/llm-router/api-reference/errors).
