Updated on 2026-10-28 GMT+08:00

Cursor

Cursor is a modern AI code editor for developers. It combines the strong features of traditional editors like VS Code with AI-powered smart coding tools. These include smart code completion, natural language programming, and code library understanding, which boost development speed. Cursor also supports popular AI models like OpenAI's GPT-4, DeepSeek, and GLM, and offers flexible customization. This makes it ideal for users from beginners to professionals.

MaaS provides access to DeepSeek and GLM models, allowing developers to use these models via API calls.

This guide describes how to use Cursor to call a DeepSeek model deployed in MaaS to build a code editor.

Billing

You are billed based on the number of tokens used. For details, see Inference Service Billing Items.

Constraints

This function is only available in the CN-Hong Kong region.

Prerequisites

Step 1: Downloading and Installing Cursor

Download and install Cursor from the official website.

Step 2: Obtaining MaaS Model API for Interconnection

Obtain the model ID, API key, and API address of the MaaS model service, which are required for connecting with Cursor.

  • Obtain the Model ID and API URL
    1. Go to the MaaS Real-Time Inference page. By default, the Built-in Services page is displayed. You can also switch to the Endpoints page.
      Figure 1 Real-Time Inference page

    2. In the Operation column of the model, click API Calling and select a version. On the View API Call Description page, obtain the API URL and model ID.

  • Obtain an API Key

    If you already have an API key, you can use it. If you do not have an API key, go to the API Key Management page to create one.

Step 3: Configuring the MaaS API in Cursor

  1. Click the settings icon in the upper right corner of the Cursor platform.
  2. In the Cursor Settings area, choose Models and click Add model.
    Figure 2 Adding a model
  3. Enter the model name obtained in Step 2 in the text box and click Add model on the right.
  4. Select only the added MaaS model. Choosing others might cause the verification to fail.
    Figure 3 Selecting a MaaS model
  5. In the OpenAI Key area, enter the API key created in Step 2.
    Figure 4 Entering the API key
  6. Click Override Openai Base URL. Change the basic API URL to the one obtained from Step 2, and remove /chat/completions at the end. Then click Save.
  7. Click Verify to verify the API connectivity. If no errors show, the setup is complete and you can start using the API.
    Figure 5 Verifying connectivity

Step 4: Using the MaaS API in Cursor to Generate Code

On the code editing page, choose the configured model in the red box for tasks like dialog, code generation, and code parsing.

Figure 6 Using the MaaS API