Set Up the Claude API in Cursor and Cline (5-Minute Guide)

Set Up the Claude API in Cursor and Cline (5-Minute Guide)

TL;DR#

Both Cursor and Cline can use Claude through any OpenAI-compatible endpoint. Get a ClaudeN API key ($5 free trial on signup; top up later with USDT or PayPal — no overseas credit card), set the base URL to https://clauden.ai/v1, paste the key, pick a Claude model, done. Exact steps for each editor below.

What you need first#

  1. A ClaudeN AI account — the $5 trial credit is enough for setup and your first sessions.
  2. An API key from your dashboard.
  3. The base URL: https://clauden.ai/v1 (OpenAI-compatible) or https://clauden.ai/v1/anthropic (Anthropic-compatible).

Cursor setup#

  1. Open Cursor's settings and go to the Models section.
  2. In the OpenAI API key field, paste your ClaudeN key.
  3. Enable the override base URL option and enter https://clauden.ai/v1.
  4. If the Claude model you want is not listed, add it as a custom model name (e.g. claude-sonnet-4-6).
  5. Verify the key, then select the model in chat and send a test message.

Note: once you override the OpenAI base URL, requests for models configured this way go through your ClaudeN key — you can watch the usage appear in your ClaudeN dashboard, which is also a quick way to confirm the wiring works.

Cline setup (VS Code)#

Cline's provider dropdown has an OpenAI Compatible option made exactly for this:

  1. Open Cline's settings (gear icon in the extension panel).
  2. API Provider → *OpenAI Compatible*.
  3. Base URLhttps://clauden.ai/v1
  4. API Key → your ClaudeN key.
  5. Model ID → the Claude model name, e.g. claude-sonnet-4-6.

Prefer the Anthropic-native path? Cline also has an *Anthropic* provider with a custom base URL option — point it at https://clauden.ai/v1/anthropic and use the same key.

Verify with cURL first (optional but smart)#

Before blaming the editor, confirm the key and endpoint work at all:

curl https://clauden.ai/v1/chat/completions \
  -H "Authorization: Bearer $CLAUDEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "ping"}]}'

If this returns a completion, any remaining error is editor configuration, not your account.

Troubleshooting#

  • 401 Unauthorized — the key was pasted with a stray space or newline, or it is the wrong key.
  • 404 / model not found — model name typo; copy the exact ID from your dashboard.
  • Insufficient balance — the trial credit is used up; top up with USDT or PayPal.
  • Works in cURL but not the editor — re-check the base URL field (/v1, no trailing typo) and that the right provider is selected.

Why route your editor through ClaudeN#

  • One key covers Claude, GPT and Gemini — switch models per task without touching billing.
  • No overseas credit card: top-ups via USDT or PayPal.
  • The $5 trial lets you test this whole setup before paying anything.

Ten minutes from now you could be prompting Claude inside your editor: create your key and start with the free trial credit.

Sign up and get $5 free credit

Start free

← ClaudeN AI Blog

Sign up and get $5 free credit