How to Add Gemini 2.5 Pro to Cursor for Free

By integrating Gemini 2.5 Pro into Cursor, you'll gain access to more efficient code generation, intelligent suggestions, and improved problem-solving capabilities without any subscription costs.

Ashley Goolam

Ashley Goolam

29 March 2025

How to Add Gemini 2.5 Pro to Cursor for Free

Gemini 2.5 Pro represents Google's latest advancement in artificial intelligence, showcasing significant improvements in reasoning and coding capabilities. This cutting-edge model offers developers enhanced productivity and streamlined coding workflows directly within their IDE environment. By integrating Gemini 2.5 Pro into Cursor, you'll gain access to more efficient code generation, intelligent suggestions, and improved problem-solving capabilities without any subscription costs.

The model excels at understanding complex coding patterns, debugging issues, and providing comprehensive explanations for technical concepts. Unlike previous versions, Gemini 2.5 Pro demonstrates remarkable contextual awareness, allowing it to maintain coherence throughout extended programming sessions. Its ability to parse and generate code across numerous programming languages makes it an invaluable tool for developers working on diverse projects.

While Cursor offers a premium subscription that includes access to various AI models, this tutorial focuses specifically on adding Gemini 2.5 Pro to your Cursor installation without incurring any additional costs. By leveraging Google's free tier API access, you can experience the full capabilities of this advanced model within your preferred development environment.

As a Cursor AI IDE user already leveraging cutting-edge development tools, you'll appreciate Apidog's powerful approach to API development.

button

This comprehensive Postman alternative unifies API design, testing, documentation, and collaboration in one sleek interface that complements your Cursor workflow.

While Cursor enhances your coding experience with AI-powered assistance, Apidog streamlines your API lifecycle management with features like automated mock servers, intuitive request building, and seamless environment switching.

The platform supports REST, GraphQL, WebSocket, and SOAP protocols, making it the perfect companion to Cursor when building API-dependent applications. Together, these modern tools create a development ecosystem that maximizes productivity while minimizing context switching across your projects.

button

Step-by-Step Guide to Adding Gemini 2.5 Pro to Cursor

Step 1: Accessing Cursor Settings

The first step in the integration process is accessing Cursor's settings panel where all configuration options are managed. The method varies slightly depending on your operating system:

For macOS:

  1. Launch the Cursor application from your Applications folder or dock
  2. Click on the "Cursor" menu in the application bar located at the top of your screen
  3. Select "Settings" from the dropdown menu
  4. Choose "Cursor Settings" from the subsequent options

For Windows/Linux:

  1. Open Cursor from your Start menu, desktop shortcut, or application launcher
  2. Click on the "File" menu in the top-left corner of the application window
  3. Select "Preferences" from the dropdown menu
  4. Click on "Settings" from the submenu that appears

This will open the settings panel where you can configure various aspects of the Cursor IDE. The panel typically appears as a new tab within the editor interface, allowing you to maintain your workspace while making adjustments.

Step 2: Navigating to Model or Extensions Section

Once in the settings panel, you'll need to locate the specific section that manages AI model configurations:

  1. Look for a navigation menu on the left side of the settings panel
  2. Scroll through the available categories to find one related to AI functionality
  3. This section might be labeled as "Models," "AI Providers," "Extensions," or "AI Configuration"
  4. In newer versions of Cursor, you may find it under "AI Settings" or "Language Models"
  5. Click on this section to access the model management interface

The exact labeling may vary depending on your Cursor version, but the AI-related settings are typically grouped together for easier access. If you're having trouble finding the correct section, you can use the search functionality at the top of the settings panel by typing keywords like "model" or "AI" to filter relevant options.

Step 3: Understanding the Correct Model Name

When configuring Gemini 2.5 Pro in Cursor, using the precise model identifier is crucial for successful integration. The exact model identifier for Gemini 2.5 Pro Experimental is:

gemini-2.5-pro-exp-03-25

This string needs to be entered exactly as shown, including all hyphens and numbers. Any deviation, even minor spelling differences or capitalization changes, can prevent the connection from working properly. The model identifier serves as the unique reference that allows Cursor to communicate with the specific version of Gemini you want to use.

Google occasionally updates their model versions, so if you encounter connection issues, verify the most current model identifier on the Google AI Studio documentation page. However, as of the time of writing, the identifier provided above is correct for accessing Gemini 2.5 Pro's experimental capabilities.

Step 4: Obtaining a Google API Key (Direct Method)

To connect Cursor with Gemini 2.5 Pro, you'll need an API key from Google. This key authenticates your requests to the Google AI services. Follow these detailed steps to obtain your key:

  1. Open your web browser and navigate to Google AI Studio:

2. Sign in with your Google account

3. Once signed in, look for the "Get API key" option

4. Click "Get API key" and select "Create API key" from the options presented

5. Copy your newly generated API key and store it securely

IMPORTANT SECURITY NOTE:

Google's API key format typically looks like a long string of letters, numbers, and symbols. Once you've secured your key, you're ready to proceed with configuring Cursor.

Step 5: Adding a Custom Model in Cursor

With your API key in hand, return to the Cursor settings panel to configure the custom model:

  1. Within the AI-related settings section identified in Step 2, examine the interface for options related to adding or customizing models
  2. Look specifically for options such as:

3. If you see a button labeled "Add" or "+" near any list of models, click it to begin adding a new model configuration

4. If you see "Override OpenAI Base URL," this is particularly important

The interface for adding custom models varies slightly between Cursor versions, but the core functionality remains the same: you need to provide connection details for the Gemini model.

Step 6: Entering the Model Name

Once you've located the appropriate section for adding a custom model:

  1. Look for a field labeled "Model Name," "Model ID," or something similar
  2. Click on this field to activate it for text entry
  3. Enter exactly: gemini-2.5-pro-exp-03-25
  4. Double-check your entry for:

This precise identifier ensures that Cursor requests the correct model version from Google's API service. Any errors in this string will result in failed connections or unexpected behavior.

Step 7: Overriding the OpenAI Base URL

Many AI code editors, including Cursor, were initially designed to work primarily with OpenAI's models. To use Google's Gemini models, you need to redirect these requests to Google's API endpoint:

Find the setting to override the default OpenAI base URL

Enter the following URL for the Gemini API in an OpenAI-compatible context:

<https://generativelanguage.googleapis.com/v1beta/openai/>

Ensure the URL is entered exactly as shown, including the trailing slash

Some versions of Cursor might have a dropdown to select "Google" as a provider instead

This URL redirection is crucial because it tells Cursor where to send its API requests. Without this change, Cursor would attempt to request the Gemini model from OpenAI's servers, which would fail.

Step 8: Entering the Google API Key

Next, you'll need to provide your Google API key to authenticate your requests:

  1. Look for a field labeled "API Key," "Google API Key," or "Authentication Token"
  1. Click on this field to activate it for text entry
  2. Carefully paste the API key you obtained from Google AI Studio in Step 4
  1. Verify that the entire key has been pasted correctly
  1. Some versions of Cursor may offer to "Test Connection" after entering the key

This API key serves as your authentication credential and is required for every request Cursor makes to the Gemini service. Without a valid key, the integration will fail even if all other settings are correct.

Step 9: Saving the Settings

After entering all required information, you need to save your configuration:

  1. Look for a "Save," "Apply," or "OK" button at the bottom of the settings panel

2. Click the save button to commit your changes

3. If prompted to restart Cursor for the changes to take effect, select "Restart Now"

4. After saving (and restarting if required), Cursor will load with your new configuration

Proper saving of settings is essential for persistent configuration. Without this step, your changes might be lost when you close and reopen Cursor.

Step 10: Testing the Integration

The final step is to verify that your Gemini 2.5 Pro integration is working correctly:

  1. Open or create a code file in the Cursor IDE

2. Look for the AI assistant interface in Cursor

3. Try using the AI-powered features:

4. If Cursor provides an option to select which AI model to use, ensure "gemini-2.5-pro-exp-03-25" is available and select it

5. Send a test prompt such as "Write a function to calculate the Fibonacci sequence in Python"

If the model responds appropriately to your prompts, congratulations! You've successfully integrated Gemini 2.5 Pro with Cursor for free.

Alternative Method: Using OpenRouter (Potentially Free)

If you encounter difficulties with the direct API key method, you can leverage OpenRouter as an intermediary platform that simplifies connecting to various AI models, including Gemini 2.5 Pro.

Step 1: Setting Up OpenRouter

  1. Visit the OpenRouter website: https://openrouter.ai/
  2. Create an account and sign in

3. Navigate to your dashboard after signing in

4. Name your API key something memorable like "Cursor Integration"

5. Set any usage limits if desired

6. Generate and copy your OpenRouter API key

Step 2: Configuring Cursor with OpenRouter

Access Cursor settings as described in Step 1 of the direct method

Navigate to the section for custom models or API keys

Enable the option to "Override OpenAI Base URL"

Enter your OpenRouter API key in the appropriate field

Set the custom API endpoint/base URL to:

<https://openrouter.ai/api/v1>

When adding the custom model, enter:

google/gemini-2.5-pro-exp-03-25:free

(Note: Verify this exact model identifier on the OpenRouter website as it may change)

Save the settings as described in Step 9 of the direct method

Test the integration as described in Step 10

The OpenRouter method has some advantages over the direct approach:

However, it adds an additional service between you and Google, which could introduce latency or become a point of failure if OpenRouter experiences issues.

Conclusion

By following this comprehensive tutorial, you've successfully added Google's powerful Gemini 2.5 Pro model to your Cursor IDE without paying for a premium subscription. This integration enhances your development workflow with advanced AI capabilities, from intelligent code completion to complex problem-solving assistance.

Remember that while the basic integration is free, API usage is subject to Google's quotas and pricing. The free tier is typically sufficient for individual developers working on personal projects, but monitor your usage to avoid unexpected charges if you exceed the free limits.

As both Cursor and Google's AI services evolve, some steps in this process may change. If you encounter any difficulties, check the official documentation for both platforms or community forums for the most up-to-date information.

With Gemini 2.5 Pro now at your fingertips within Cursor, you're equipped with one of the most advanced AI coding assistants available today, ready to boost your productivity and tackle complex development challenges.

button

Explore more

30+ Public Web 3.0 APIs You Can Use Now

30+ Public Web 3.0 APIs You Can Use Now

The ascent of Web 3.0 marks a paradigm shift in how we interact with the digital world. Moving beyond the centralized platforms of Web 2.0, this new era champions decentralization, user ownership, and a more transparent, permissionless internet. At the heart of this transformation lie Application Programming Interfaces (APIs), the unsung heroes that enable developers to build innovative decentralized applications (dApps), integrate blockchain functionalities, and unlock the vast potential of thi

4 June 2025

Fixed: "Error Cascade has encountered an internal error in this step. No credits consumed on this tool call."

Fixed: "Error Cascade has encountered an internal error in this step. No credits consumed on this tool call."

Facing the dreaded "Error Cascade has encountered an internal error in this step. No credits consumed on this tool call"? You're not alone. We delve into this frustrating Cascade error, explore user-reported workarounds.

4 June 2025

How to Obtain a Rugcheck API Key and Use Rugcheck API

How to Obtain a Rugcheck API Key and Use Rugcheck API

The cryptocurrency landscape is rife with opportunity, but also with significant risk. Rug pulls and poorly designed tokens can lead to substantial losses. Rugcheck.xyz provides a critical service by analyzing crypto projects for potential red flags. Its API allows developers, traders, and analysts to programmatically access these insights, automating and scaling their due diligence efforts. This guide will focus heavily on how to use the Rugcheck.xyz API, equipping you with practical Python exa

4 June 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs