> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.mor.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor Integration

> How to integrate Morpheus Inference API with Cursor IDE

# How To Integrate with Cursor

### What is Cursor?

Cursor IDE is an AI-powered code editor designed to enhance developer productivity by enabling code generation from natural language, intelligent autocompletion, and context-aware refactoring. Its strength lies in AI-driven tools that understand coding context, automate repetitive tasks, optimize complex logic, and more. Cursor allows seasoned developers to focus on higher-level problem-solving while also assisting new developers learning to code. Cursor allows you to bring your own OpenAI API Compatible source of inference, and Morpheus can be integrated in just a few simple steps.

## Prerequisites

* Morpheus API Key
* Cursor Installed
* Morpheus Model Identified

## Step by Step

### Step 1: Download and Install Cursor

Download and Install Cursor through [Cursor.com](https://cursor.com)

<img src="https://mintcdn.com/morpheus/MFJp3X40_OEh22Bh/images/cursor/download.png?fit=max&auto=format&n=MFJp3X40_OEh22Bh&q=85&s=b9e7678f96058a46d3292371b72fe880" alt="Download Cursor" style={{ borderRadius: '0.5rem', border: '2px solid rgba(16, 185, 129, 0.3)' }} width="2050" height="962" data-path="images/cursor/download.png" />

### Step 2: Open Settings

Open Cursor and Click the gear icon on the top right for Settings

<img src="https://mintcdn.com/morpheus/MFJp3X40_OEh22Bh/images/cursor/gear.png?fit=max&auto=format&n=MFJp3X40_OEh22Bh&q=85&s=b1f0663462441950a133305356d74b79" alt="Settings gear icon" style={{ borderRadius: '0.5rem', border: '2px solid rgba(16, 185, 129, 0.3)' }} width="633" height="171" data-path="images/cursor/gear.png" />

### Step 3: Access Models Tab

Click the "Models" Tab for AI Integrations

<img src="https://mintcdn.com/morpheus/MFJp3X40_OEh22Bh/images/cursor/cursormodels.png?fit=max&auto=format&n=MFJp3X40_OEh22Bh&q=85&s=446801fbd2ec559af9e168ca9749ad6b" alt="Cursor models tab" style={{ borderRadius: '0.5rem', border: '2px solid rgba(16, 185, 129, 0.3)' }} width="1268" height="876" data-path="images/cursor/cursormodels.png" />

### Step 4: Add Your Model

Scroll down to the models and click the "+Add Model" button, then input the model name of the model you identified in the Morpheus Marketplace. Then click "+ Add Model". You will see it populate in the list above

<img src="https://mintcdn.com/morpheus/MFJp3X40_OEh22Bh/images/cursor/addmodel.png?fit=max&auto=format&n=MFJp3X40_OEh22Bh&q=85&s=8871f8ceae01269105ab7bbbf176907c" alt="Add model" style={{ borderRadius: '0.5rem', border: '2px solid rgba(16, 185, 129, 0.3)' }} width="1160" height="169" data-path="images/cursor/addmodel.png" />

### Step 5: Configure OpenAI API Key

Go to the "OpenAI API Key" section and input the following:

* **OpenAI API Key:** Use your Morpheus API Key
* **Override OpenAI Base URL:** `https://api.mor.org/api/v1`

<img src="https://mintcdn.com/morpheus/MFJp3X40_OEh22Bh/images/cursor/openaikey.png?fit=max&auto=format&n=MFJp3X40_OEh22Bh&q=85&s=981e65ba265c849474f4ef4648f5cde0" alt="OpenAI API Key configuration" style={{ borderRadius: '0.5rem', border: '2px solid rgba(16, 185, 129, 0.3)' }} width="1023" height="227" data-path="images/cursor/openaikey.png" />

### Step 6: Verify and Enable

Click "Save" next to the base URL and then click "Verify" next to the API key. Once verified, click on the red radio button to enable the integration. Click "Enable OpenAI API Key" when prompted

<img src="https://mintcdn.com/morpheus/MFJp3X40_OEh22Bh/images/cursor/enableopenai.png?fit=max&auto=format&n=MFJp3X40_OEh22Bh&q=85&s=b1f92648e404862ac43fcabe48150451" alt="Enable OpenAI integration" style={{ borderRadius: '0.5rem', border: '2px solid rgba(16, 185, 129, 0.3)' }} width="511" height="177" data-path="images/cursor/enableopenai.png" />

### Step 7: Success!

If successful, you will see the radio button turn from red to green indicating success.

<img src="https://mintcdn.com/morpheus/MFJp3X40_OEh22Bh/images/cursor/cursorsuccess.png?fit=max&auto=format&n=MFJp3X40_OEh22Bh&q=85&s=e94df6d80b89cb9039f3bfdcfb256bc6" alt="Successful integration" style={{ borderRadius: '0.5rem', border: '2px solid rgba(16, 185, 129, 0.3)' }} width="1050" height="310" data-path="images/cursor/cursorsuccess.png" />

<Tip>
  You're now ready to use Morpheus AI within Cursor! Start coding with AI-powered assistance from the Morpheus Inference Marketplace.
</Tip>
