Integrate the Martian Code Router With Cursor

This document describes how to set up Cursor to route all your LLM requests through Martian.

Ensure you have your Martian API key before continuing.

Prerequisites

  1. Ensure you have Cursor installed. See cursor.com/downloads for installation instructions.

Setup Steps

Step 1: Open Cursor Settings

Navigate to Cursor > Preferences > Cursor Settings.

Step 2: Configure API Key

  1. Navigate to Models and expand API Keys.
  2. Enter your Martian API key and click Verify.
Cursor API Key Configuration

Step 3: Configure Base URL

  1. Toggle Override OpenAI Base URL.
  2. Enter https://api.withmartian.com/v1.
Override OpenAI Base URL

Step 4: Enable Models

In the Models list, enable any of your preferred model(s).

See Available Models for a list of supported models.

Cursor Settings

Step 5: Test the Integration

  1. Open the chat interface (on Mac + + I).
  2. Select the model you have just enabled.
  3. Press Enter to start chatting.
Cursor Chat Interface

You can now use Martian to route commands as your AI assistant in Cursor.


Next Steps

View Available Models

Browse 200+ AI models from leading providers with real-time pricing.

Read more

View Other Integrations

Explore other ways to integrate Martian with your development workflow.

Read more