Skip to main content

Cursor IDE Integration

Use Korad.AI with Cursor IDE for cheaper AI-powered coding.

Setup

  1. Open Cursor Settings (Cmd+, / Ctrl+,)
  2. Go to "Models" section
  3. Set "Base URL" to: https://api.korad.ai/v1
  4. Set "API Key" to: sk-korad-YOUR-KEY

Method 2: Environment Variables

# Add to your shell profile (~/.zshrc or ~/.bashrc)
export ANTHROPIC_BASE_URL="https://api.korad.ai/v1"
export ANTHROPIC_API_KEY="sk-korad-YOUR-KEY"

# Restart Cursor

Verification

Test that Cursor is using Korad.AI:

  1. Open a new chat in Cursor
  2. Ask: "What API are you using?"
  3. Check response for speed and quality

Features

Tab Completion

# Start typing a function
def binary_search(arr, tar
# Cursor completes with Korad.AI
# Cost: $0.003 vs $0.009 via Anthropic

Chat

# Ask Cursor to explain code
# Response optimized through Korad.AI
# 60-80% cost savings

Refactoring

# Ask Cursor to refactor
# High-quality results at lower cost

Configuration

Project-Specific Settings

Create .cursorrules in your project:

--base-url=https://api.korad.ai/v1
--api-key=sk-korad-YOUR-KEY
--model=claude-sonnet-4-20250514-optim

Workspace Settings

Create .cursor/workspace.json:

{
"anthropic.baseURL": "https://api.korad.ai/v1",
"anthropic.apiKey": "sk-korad-YOUR-KEY",
"korad.savingsLevel": "high"
}

Example Usage

Code Generation

# Prompt: "Create a REST API with FastAPI"
# Cursor generates via Korad.AI
# Cost: $0.12 vs $0.36 via Anthropic

Bug Fixing

# Prompt: "Find and fix the bug in this code"
# Cursor analyzes and fixes
# Cost: $0.08 vs $0.24 via Anthropic

Code Explanation

# Prompt: "Explain how this works"
# Cursor explains via Korad.AI
# Cost: $0.02 vs $0.06 via Anthropic

Advanced Features

Model Selection

Choose which model to use:

{
"model": "claude-sonnet-4-20250514-optim" // 60% cheaper
}

Savings Control

Set savings level:

{
"korad.savingsLevel": "medium" // low, medium, high, maximum
}

Troubleshooting

"Connection Error"

Verify base URL includes /v1:

https://api.korad.ai/v1  ✓
https://api.korad.ai ✗

"Invalid API Key"

Make sure key starts with sk-korad-:

sk-korad-xxxxxxxxxxxx  ✓
sk-ant-xxxxxxxxxxxx ✗

Slow Responses

Try the optimized model:

{
"model": "claude-sonnet-4-20250514-optim"
}

Best Practices

  1. Use optimized model-optim models are 40-60% cheaper
  2. Set savings level — Balance cost vs quality
  3. Monitor balance — Check dashboard periodically
  4. Use project-specific keys — Track usage per project

Cost Comparison

TaskAnthropicKorad.AISavings
Tab completion$0.009$0.00367%
Code generation$0.36$0.1267%
Bug fixing$0.24$0.0867%
Refactoring$0.18$0.0667%

Next Steps

Claude Code Integration →