Quick Start
1. Download and Install
Visit Cursor Official Website to download and install the version suitable for your operating system:- Windows: Windows 10 or higher
- macOS: macOS 10.15 or higher
- Linux: Ubuntu 18.04 or higher
2. Configure Laozhang API
1
Open Settings
Click “Cursor” in the menu bar > “Settings” (or use shortcut
Cmd/Ctrl + ,
)2
Find Models Configuration
In the left sidebar, select “Models” option
3
Configure OpenAI Compatible API
Scroll to the “OpenAI API Key” section:
- API Provider: Select “OpenAI Compatible”
- Base URL: Enter
https://api.laozhang.ai/v1
- API Key: Enter your Laozhang API key
- Default Model: Choose a model (e.g.,
gpt-4-turbo
)
4
Save Configuration
Click “Save” button to complete configuration

Obtaining API Key
- Visit Laozhang API Console
- Click “Create New Token” button
- Choose a suitable billing method
- Copy the generated API Key
Recommended Model Selection
Cursor supports multiple large language models, choose appropriate models based on different programming needs:Programming Scenario | Recommended Model | Cost | Performance |
---|---|---|---|
Daily Code Completion | gpt-3.5-turbo | Low | Fast response |
Complex Function Development | gpt-4-turbo | Medium | Strong reasoning ability |
Large Project Refactoring | claude-sonnet-4-20250514 | Medium | Long context support |
Multi-language Programming | gemini-2.5-pro | Medium | Broad language support |
Code Review and Optimization | gpt-4-turbo | Medium | Deep code understanding |
Model Selection Strategy
- Cost-sensitive users: Recommend
gpt-3.5-turbo
for daily coding - Quality prioritizers: Recommend
gpt-4-turbo
orclaude-sonnet-4
- Large codebase: Recommend
claude-sonnet-4
, supports 200K context - Multimodal needs: Recommend
gemini-2.5-pro
, supports image understanding
Core Features
1. AI Code Completion (Tab)
Cursor provides intelligent code completion triggered by the Tab key: Features:- Context-aware smart completion
- Multi-line code generation
- Automatic import statement generation
- Intelligent comment writing
2. AI Chat (Cmd/Ctrl + K)
Chat with AI in the editor, get instant help: Use Cases:- Ask code questions
- Request refactoring suggestions
- Generate test cases
- Explain complex algorithms
- Debug error messages
3. AI Editing (Cmd/Ctrl + L)
Select code, trigger AI editing mode: Features:- Code refactoring
- Style adjustment
- Add comments
- Type annotation
- Error fixing
4. Codebase Indexing
Cursor can index your entire codebase, providing:- Global code search
- Intelligent jump to definition
- Refactoring suggestions
- Dependency analysis
5. Multi-file Editing
Operate on multiple files simultaneously:- Batch code refactoring
- Consistent style modification
- Cross-file function extraction
- Unified dependency updates
Advanced Features
@Symbols Citation
Use@
symbol in chat mode to cite code elements:
Terminal Integration
Cursor integrates terminal, you can:- Let AI generate terminal commands
- Explain command outputs
- Debug errors
- Optimize scripts
Git Integration
Deeply integrated with Git:- AI-generated commit messages
- Code review assistance
- Conflict resolution suggestions
- Branch management advice
Configuration Best Practices
Basic Configuration
Advanced Configuration
Multi-Model Configuration
Configure different models for different scenarios:Usage Scenarios
Scenario 1: New Project Development
Scenario 2: Code Refactoring
Scenario 3: Bug Fixing
Scenario 4: Learning New Technologies
Troubleshooting
Connection Issues
Problem: Unable to connect to API Solutions:- Check if Base URL is correct:
https://api.laozhang.ai/v1
- Verify API Key validity (visit console)
- Check network connection
- Confirm firewall settings
No Response
Problem: AI doesn’t respond Solutions:- Check account balance
- Confirm model availability
- Try switching models
- Check if request exceeds rate limit
Inaccurate Suggestions
Problem: Code suggestions don’t meet expectations Solutions:- Provide more context information
- Refine requirement descriptions
- Try different models
- Adjust temperature parameter (lower = more deterministic, higher = more creative)
Response Too Slow
Problem: AI response speed is slow Solutions:- Switch to a faster model (e.g.,
gpt-3.5-turbo
) - Reduce maxTokens setting
- Simplify query content
- Check network speed
Best Practices
1. Effective Communication
Communicate clearly and specifically with AI:2. Utilize Context
Make full use of Cursor’s context awareness:- Use
@
symbol to cite relevant files - Provide necessary background information
- Keep editor open with related code
3. Iterative Improvement
Don’t expect perfect results at once:- Get initial suggestions
- Test and evaluate
- Provide feedback
- Iterative optimization
4. Security Awareness
Protect sensitive information:- Don’t paste actual API keys in chat
- Don’t share production database connection strings
- Don’t upload confidential business logic
5. Cost Control
Reasonably control usage costs:- Use lighter models for simple tasks
- Avoid unnecessary repeated requests
- Set reasonable maxTokens limits
- Regularly review usage
Shortcut Reference
Shortcut | Function |
---|---|
Tab | Trigger code completion |
Cmd/Ctrl + K | Open AI chat |
Cmd/Ctrl + L | Trigger AI editing |
Cmd/Ctrl + Shift + P | Open command panel |
Cmd/Ctrl + P | Quick file open |
Cmd/Ctrl + , | Open settings |