Cursor Integration
Configure Cursor IDE to use Antbase as an OpenAI-compatible backend. Get intelligent model routing for Cursor's chat, Composer, and inline edit features.
What this enables
- Cursor Chat and Composer powered by Antbase routing
- Use your own API key instead of Cursor's built-in models
- Automatic failover -- Cursor never gets a dead model
- Cost optimization with virtual model selection
Quick Start
1. Open Cursor Settings
Go to Cursor > Settings > Models (or press Cmd+, and navigate to the Models tab).
2. Add OpenAI API key
In the OpenAI API Key section:
| Field | Value |
|---|---|
| OpenAI API Key | Your Antbase API key (ant_...) |
| Override OpenAI Base URL | https://antbase.ai/v1 |
3. Add custom models
Scroll to Model Names and add Antbase virtual models:
ant:auto
ant:fast
ant:best
ant:coder
ant:reasoningAdd each model name on a separate line in the "Model Names" field.
Ready to use
Select an Antbase model from the model picker in Cursor Chat or Composer.
Configuration
Recommended model assignments for Cursor features:
| Feature | Recommended Model | Why |
|---|---|---|
| Chat | ant:coder | Best for code Q&A and generation |
| Composer | ant:best | Multi-file edits need frontier models |
| Inline Edit (Cmd+K) | ant:coder | Precise code transformations |
Usage Examples
Chat with codebase context
Open Cursor Chat (Cmd+L), select ant:coder from the model picker, and use @codebase to reference your project.
Composer for multi-file edits
Open Composer (Cmd+I), select ant:best, and describe the changes across multiple files. Antbase routes to a frontier model for reliable multi-file generation.
Virtual Models
| Model | Best for | Notes |
|---|---|---|
| ant:auto | General use | Picks optimal model per request |
| ant:fast | Quick edits | Low latency for inline completions |
| ant:best | Composer, refactoring | Frontier models for complex tasks |
| ant:free | Testing | Zero cost during evaluation |
| ant:reasoning | Architecture | Deep reasoning for design decisions |
| ant:coder | Code generation | Optimized for chat and inline edits |
See Virtual Models for the full list.
Troubleshooting
Models not appearing in picker
After adding model names in settings, restart Cursor. Custom model names must be added to the "Model Names" list to appear in the model picker dropdown.
Using Cursor's built-in models alongside Antbase
Cursor's native models (cursor-small, etc.) use Cursor's own API and do not go through Antbase. Only models you explicitly add to the "Model Names" list will route through your Antbase base URL.