Skip to main content
You can easily integrate the GLM-4.6 model into Cursor that supports the OpenAI API protocol.
Note: Custom configuration is only supported in Cursor Pro and higher versions
Using the GLM Coding Plan, you need config the exclusive Coding API https://api.z.ai/api/coding/paas/v4 instead of the Common API https://api.z.ai/api/paas/v4

1. Install Cursor

Download and install Cursor from the official website.

2. Create a New Provider/Model

In Cursor, navigate to the “Models” section and click the “Add Custom Model”. Description
  • Select the OpenAI Protocol.
  • Configure the OpenAI API Key (obtained from the Z.AI).
  • In Override OpenAI Base URL, replace the default URL with https://api.z.ai/api/coding/paas/v4.
  • Enter the model you wish to use, such as GLM-4.6, GLM-4.5 or GLM-4.5-air.
  • Note: In Cursor, the model name must be entered in uppercase, such as GLM-4.6.
Description

3. Save and Switch Models

After configuration, save your settings and select the newly created GLM-4.6 Provider on the homepage.

4. Get Started

With this setup, you can begin using the GLM-4.6 model for code generation, debugging, task analysis, and more. Description