Cursor

Updated at:

Use Alibaba Cloud Model Studio models in Cursor.

Quick Start

  1. 1

    Get an API Key

    Obtain an API Key for your billing plan:

  2. 2

    Configure the model

    In Cursor, open Cursor Settings > Models, enable OpenAI API Key and Override OpenAI Base URL, and enter the values for your billing plan.

    Token Plan

    ItemValue
    Base URLhttps://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
    API KeyToken Plan API Key
    ModelEnter a text generation model supported by Personal Edition or Team Edition. Some models require aliases; see FAQ

    Pay-as-you-go

    Replace {WorkspaceId} with your actual Workspace ID.

    ItemValue
    Base URLhttps://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
    API KeyAlibaba Cloud Model Studio API Key
    ModelFor example, qwen3.8-max or qwen3.8-flash

    Coding Plan

    ItemValue
    Base URLhttps://coding.dashscope.aliyuncs.com/v1
    API KeyCoding Plan API Key
    ModelEnter a supported text generation model
  3. 3

    Verify

    Send a message in the Cursor chat panel. A normal response confirms the configuration.

Integrate Bailian CLI

Bailian CLI registers a Skill at ~/.cursor/skills/bailian-cli/ during installation, allowing Cursor to invoke Bailian capabilities through conversation. For the full capability list, see the Bailian CLI console. Prerequisite: Node.js 18+.

  1. 1

    Install Bailian CLI

    In the Cursor chat, run:

    Please install the Alibaba Cloud Bailian CLI globally: npm install -g bailian-cli
    
  2. 2

    Configure the API Key

    Obtain an API Key, then ask Cursor to configure it in the chat.

Error Codes

If you encounter errors during configuration, refer to the FAQ for your billing plan:

FAQ

How do I use savings plans and resource plans with pay-as-you-go?

The pay-as-you-go setup remains the same: use your general Model Studio API key and Base URL. After you purchase a savings plan or resource plan, it takes effect automatically and eligible usage is deducted automatically. See Savings plans and resource plans.

Cannot invoke an added model in Cursor

Error messages:

  • The model xxx does not work with your current plan or api key.
  • Named models unavailable Free plans can only use Auto. Switch to Auto or upgrade plans to continue.

Cause: The free version of Cursor only supports Auto mode and does not support invoking custom models.

Solution: Upgrade to Cursor Pro or a higher plan.

Cannot find the added model after configuration

In the chat panel, disable Auto mode, then select the desired model from the model dropdown.

Some model names cannot be invoked

Some model IDs conflict with Cursor built-in model names and require hyphenated aliases:

  • Write glm-5.3 as glm-5-3, glm-5.2 as glm-5-2, glm-5.1 as glm-5-1, and glm-5 as glm-5-0
  • Write kimi-k2.6 as kimi-k2-6, and kimi-k2.5 as kimi-k2-5

Available models differ by billing plan. Refer to the corresponding supported models list.

Model invocation error: "We're having trouble connecting to the model provider." or "Unauthorized User API key"

Troubleshoot the following items:

  • Verify that the API Key, Base URL, and model name match the selected billing plan. Credentials are not interchangeable between plans.
  • For Pay-as-you-go, verify that the API Key and Base URL belong to the same region.
  • Verify whether the model name requires an alias. See the previous item.