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

# Cursor

> Use Cursor with CC Switch to manage multiple model providers through a local proxy and switch between them in one click

> This guide explains how to use the AI code editor **Cursor** together with the open-source configuration manager **CC Switch** for unified management and one-click switching across model providers.

## 1. What is Cursor

Cursor is a code editor built for AI-assisted programming. With Cursor you can do:

* Code completion
* Code generation
* Code editing
* Code explanation
* Project analysis
* Bug troubleshooting
* Agentic coding

## 2. What is CC Switch

CC Switch is an **open-source local GUI tool for AI service configuration management and reverse proxying**.

It solves two problems:

1. **Unified configuration**: centralizes the API keys and base URLs scattered across Claude Code, Cursor, OpenCode, and other AI coding tools, so multiple config files no longer conflict.
2. **Protocol relay**: lets apps that only speak a specific native protocol (such as Cursor's Codex plugin) call more third-party compatible APIs through a standard interface.

After connecting Cursor to CC Switch, the flow looks like this:

```text theme={null}
Cursor
   ↓
CC Switch API
   ↓
Available models
   ↓
AI response
   ↓
Cursor
```

## 3. Why use Cursor with CC Switch

Day-to-day development often requires switching between model providers — the official Anthropic API, various relay services, self-hosted gateways, and so on. Traditionally every switch means hand-editing each tool's config file, which is tedious and error-prone.

CC Switch brings:

* **Configure once, apply everywhere**: maintain one set of provider configs on the desktop; Cursor and other tools follow automatically.
* **One-click switching**: changing providers usually takes under 10 seconds, with no need to re-enter keys.
* **Reuse resources without migrating**: when your Claude quota runs out, switch smoothly to Codex, DeepSeek, and others without moving project files.
* **Isolated configurations**: keep independent configs for different projects or compliance requirements.

## 4. Prerequisites

* Cursor and CC Switch installed on your machine
* An API key created in the [GravitexAI console](https://maas.gravitex.ai/#/api-keys) (format: `sk-xxxxxxxxxx`)

## 5. Installing Cursor and CC Switch

<Tabs>
  <Tab title="Install Cursor">
    Download from [https://cursor.com/download](https://cursor.com/download). macOS and Windows are supported.
  </Tab>

  <Tab title="Install CC Switch">
    See the [CC Switch guide](/en/integrations/cc-switch) on this site.
  </Tab>
</Tabs>

## 6. Configuring CC Switch in Cursor

### Step 1: Configure a provider in CC Switch

1. Configure your provider in CC Switch (API key + base URL).
2. Launch CC Switch, go to **Settings → Routing**, turn on the main routing switch, and select the apps you want to route.
3. Confirm the local proxy is listening, then copy the service address shown at the bottom of the page (the exact port is whatever the app displays, for example `http://127.0.0.1:15721`).

<Frame>
  <img src="https://mintcdn.com/gravitexai/YCzYS8JUSvjzZQaq/images/cursor1.png?fit=max&auto=format&n=YCzYS8JUSvjzZQaq&q=85&s=fcc803b138f0f45f36c5d69560bc9fa3" alt="CC Switch local routing and service address" width="2275" height="1280" data-path="images/cursor1.png" />
</Frame>

### Step 2: Configure Cursor

1. Open Cursor and press **Cmd + ,** (macOS) or **Ctrl + ,** (Windows / Linux) to open Settings. You can also click the gear icon ⚙️ in the bottom-left corner and choose Models.
2. Go to the **Models** panel in the left navigation.
3. Enter your GravitexAI key in the **OpenAI API Key** field.
4. Find the **OpenAI API** settings section:
   * Turn on **Override OpenAI Base URL**.
   * Enter the local endpoint provided by CC Switch, for example `http://127.0.0.1:15721/v1` (the `/v1` suffix is required; no trailing slash).

### Step 3: Add model IDs

1. Enter the model ID you want to use in the **Add or search model** box at the top of the Models list.
2. Model IDs follow the convention of the provider configured in CC Switch, for example `gemini-3-flash-preview`, `seed-2-1-turbo-260628`, or `claude-sonnet-4-6`.

<Frame>
  <img src="https://mintcdn.com/gravitexai/YCzYS8JUSvjzZQaq/images/cursor2.png?fit=max&auto=format&n=YCzYS8JUSvjzZQaq&q=85&s=fa6f0ac7183c14aee806dcaa37f59682" alt="Configuring the API key and base URL in the Cursor Models panel" width="2704" height="1696" data-path="images/cursor2.png" />
</Frame>

<Warning>
  Important: Cursor's official policy currently restricts using third-party API keys (including GravitexAI) to accounts that meet the following conditions:

  * You must be on the **Pro Plan** (a paid subscription) — the Free Plan cannot use third-party API keys
  * You need a working proxy/VPN to reliably reach the third-party API service
</Warning>

## 7. Supported models

Through GravitexAI, Cursor supports 100+ mainstream AI models, including OpenAI, Google Gemini, Claude, DeepSeek, and leading Chinese models.

<Card title="See currently recommended models" icon="star" href="https://maas.gravitex.ai/#/api-models">
  Browse the latest model recommendations, performance comparisons, and scenario-based advice — covering writing, coding, fast responses, image generation, video generation, and more.
</Card>

<Info>
  **Why aren't specific models listed here?**

  AI models iterate very quickly. To make sure you get the most accurate recommendations, we maintain the up-to-date model list, performance data, and usage advice on the [model recommendation page](https://maas.gravitex.ai/#/api-models).
</Info>

## 8. Common configuration issues

<AccordionGroup>
  <Accordion title="Incorrect API key">
    If you see:

    ```text theme={null}
    401 Unauthorized
    ```

    Check the following first:

    1. Is the API key correct?
    2. Did you copy extra whitespace?
    3. Has the API key expired?
    4. Did you accidentally use a key from another platform?
  </Accordion>

  <Accordion title="Model not found">
    If you see something like:

    ```text theme={null}
    Model not found
    ```

    Check the model name. Common causes:

    * The model name is misspelled
    * The current key has no access to that model
    * The model has been retired or renamed
    * You used another user's model name
  </Accordion>

  <Accordion title="The API works, but Cursor doesn't">
    This usually points to API compatibility.

    Requests sent by Cursor must match the API protocol supported by CC Switch. If the request format, model name, or response structure doesn't match what the client expects, you may see:

    * A successful request with no content
    * The model failing to return anything
    * Cursor unable to parse the response
    * Conversations breaking off mid-stream

    In this case, first test the API with `curl` or another API tool to confirm it returns normally.
  </Accordion>

  <Accordion title="Cursor AI is unresponsive or stuck loading">
    1. Check whether the CC Switch node has dropped, and reconnect to a low-latency node;
    2. Confirm the proxy settings in `settings.json` are saved and the port is correct;
    3. Fully quit Cursor (including background processes) and restart it;
    4. Disable strict SSL verification and switch to a stable overseas node.
  </Accordion>

  <Accordion title="Occasional model call timeouts">
    Usually caused by node network fluctuation. Switch to a backup node, or restart CC Switch to reconnect.
  </Accordion>
</AccordionGroup>

<Info>
  **More help**: contact technical support at [bd@gravitex.ai](mailto:bd@gravitex.ai), or call 13603055233.
</Info>
