Learn how to use alternative models in Cursor, including OpenAI, OpenRouter, DeepSeek, and more.

Using Alternative Models in Cursor

Cursor, the AI-powered code editor, offers flexibility in choosing the language model that powers its AI features. While it comes with default models, you can enhance your coding experience by using alternative models. This article will guide you through the process of using other models in Cursor and provide pricing information for some popular options.

Setting Up Custom API Keys in Cursor

Cursor allows you to use your own API keys for various AI providers. Here's how you can set them up:

  1. Open Cursor Settings
  2. Navigate to the "Models" section
  3. Look for the API key input fields for different providers

You can set up API keys for:

  • OpenAI
  • Anthropic
  • Google
  • Azure

For detailed instructions, refer to the official Cursor documentation on Custom API Keys.

Popular Model Options and Pricing

OpenAI Models

OpenAI provides a range of models with varying capabilities and pricing. You can find the detailed pricing information on the OpenAI API Pricing page.

OpenRouter

OpenRouter allows you to access a variety of models from different providers through a single API. To use OpenRouter with Cursor:

  1. Get your API key from the OpenRouter Keys page
  2. Use this key in Cursor's OpenAI API key field

For pricing information, you can check the rates for different models on the OpenRouter platform.

DeepSeek Models

DeepSeek offers models specifically designed for coding tasks. Their pricing structure is as follows:

| Model | Context Length | Input Price (Cache Hit) | Input Price (Cache Miss) | Output Price | |----------------|----------------|--------------------------|--------------------------|-----------------| | deepseek-chat | 128K | $0.014 / 1M tokens | $0.14 / 1M tokens | $0.28/1M tokens | | deepseek-coder | 128K | $0.014 / 1M tokens | $0.14 / 1M tokens | $0.28/1M tokens |

For more details, visit the DeepSeek API Pricing page.

Using Local LLMs with Cursor

For those interested in using local Language Models (LLMs) with Cursor, it's possible to set up a local server that mimics the OpenAI API. This allows you to use models running on your own hardware. For a detailed guide on how to achieve this, check out this Reddit post on using local LLMs with Cursor.

Conclusion

By leveraging these alternative models, you can customize your Cursor experience to best suit your coding needs and budget. Whether you prefer the robust capabilities of OpenAI, the variety offered by OpenRouter, the coding-specific features of DeepSeek, or the flexibility of local LLMs, Cursor provides the flexibility to enhance your AI-assisted coding workflow.

Remember to always check the latest pricing information on the official websites of these providers, as prices may change over time.