应用配置
Cursor Configuration
Using smai.ai in Cursor
Introduction
Cursor is an AI-driven code editor that supports custom OpenAI API endpoints.
Configuration Steps
Open Settings
In Cursor, press Cmd/Ctrl + , to open settings, or click the menu File > Preferences > Settings.
Find OpenAI Configuration
Search for OpenAI or API in the settings to find the OpenAI-related configuration options.
Configure API
Fill in the following information:
| Configuration Item | Value |
|---|---|
| OpenAI API Key | sk-your-api-key |
| API Base URL | https://api.smai.ai/v1 |
Note
The configuration interface of different versions of Cursor may vary slightly, please fill in according to the actual interface.
Select Model
In the model selection, choose the model you want to use, such as:
gpt-4.1claude-4.5-sonnetgpt-4o
Test Connection
After configuration is complete, try using Cursor's AI features (such as code completion, Chat) to verify if the configuration is successful.
Recommended Models
| Function | Recommended Models |
|---|---|
| Code Completion | gpt-4.1, claude-4.5-sonnet |
| Code Explanation | gpt-4.1, claude-4.5-sonnet |
| Code Refactoring | claude-4.5-sonnet |
| Complex Problems | claude-opus-4 |
