Skip to main content

Cursor

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
    • Pay-as-you-go
    • Coding Plan
    ItemValue
    Base URLhttps://token-plan.ap-southeast-1.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
  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

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, it takes effect automatically and eligible usage is deducted automatically. See Savings plans.
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.
In the chat panel, disable Auto mode, then select the desired model from the model dropdown.
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.
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.