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
- 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
- Navigate to Models and expand API Keys.
- Enter your Martian API key and click Verify.

Step 3: Configure Base URL
- Toggle Override OpenAI Base URL.
- Enter
https://api.withmartian.com/v1
.

Step 4: Enable Models
In the Models list, enable any of your preferred model(s).
See Available Models for a list of supported models.

Step 5: Test the Integration
- Open the chat interface (on Mac ⌘ + ⇧ + I).
- Select the model you have just enabled.
- Press Enter to start chatting.

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