# So verwenden Sie Ihren eigenen API-Schlüssel in Cursor IDE

Cursor Pro costs $20/month with a usage cap. With a RunAPI key you pay per token — the same Claude and GPT-4o models at 50% off official rates, no monthly fee, no Pro subscription required. This guide covers where to paste your key in Settings &gt; Models, how to set the base URL (the step most guides skip), and how to fix the common &#39;unauthorized user api key&#39; error.

*Updated June 23, 2026 · RunAPI Editorial*

## Kann ich Cursor mit meinem eigenen API-Schlüssel verwenden?

Yes. Cursor lets you add your own API key on the free plan — you do not need Cursor Pro. Go to Settings &gt; Models, scroll to the OpenAI section, and fill in two fields: the OpenAI Base URL (https://runapi.ai/v1) and the OpenAI API Key (your RunAPI key). RunAPI gives you access to Claude 3.5 Sonnet, GPT-4o, Gemini, and other models at 50% of what Anthropic and OpenAI charge directly. The most common setup error — the &#39;unauthorized user api key&#39; message — means the base URL field is empty, so Cursor is sending your key to the wrong endpoint.

- **Funktioniert in allen Cursor-Plänen**: You do not need a Pro subscription to use your own API key. BYOK works on the free Cursor tier and on Pro.
- **OpenAI-kompatibler Endpunkt**: RunAPI uses the same request and response format as the OpenAI API. Cursor&#39;s OpenAI API Key field accepts it without any code changes.
- **50 % Rabatt auf offizielle Modellpreise**: RunAPI berechnet die Hälfte des Provider-Listenpreises. Claude 3.5 Sonnet Eingabe kostet 1,50 $/M Tokens über RunAPI gegenüber 3,00 $/M direkt über Anthropic.
- **Fehler &#39;unauthorized user api key&#39; beheben**: This error almost always means the OpenAI Base URL field is empty. Set it to https://runapi.ai/v1 alongside your key and the error clears.

## Wo Sie Ihren API-Schlüssel in Cursor eingeben

Cursor keeps all model configuration in one place. Open Cursor, press Cmd+Shift+J (Mac) or Ctrl+Shift+J (Windows/Linux) to open Settings, then click the Models tab on the left. Find the OpenAI section — you need to fill in two fields there. The OpenAI Base URL tells Cursor to send requests to RunAPI instead of OpenAI directly. The OpenAI API Key field is where you paste your RunAPI key. Both fields must be set. If you leave the base URL blank, Cursor sends your key to api.openai.com, which will reject it every time.

## Den Fehler &#39;unauthorized user api key&#39; in Cursor beheben

The &#39;unauthorized user api key&#39; message from Cursor means one of three things. First, the OpenAI Base URL field is empty, so Cursor sends your RunAPI key to api.openai.com, which rejects it — this is the most common cause. Second, the key was copied with a leading or trailing space. Third, the key was revoked or regenerated and the old value is stale. RunAPI keys start with &#39;rp-&#39; and are not standard OpenAI keys — they will always fail if Cursor tries to authenticate them against openai.com. Always set the base URL alongside the key. If a specific model still returns an error after the key and URL are correct, double-check the model name matches the exact slug shown at runapi.ai/pricing — a mismatch returns a different error than an auth failure.

### Fehlende Base URL

Die häufigste Ursache. Wenn OpenAI Base URL leer ist, sendet Cursor Ihren RunAPI-Schlüssel an api.openai.com, das ihn ablehnt. Setzen Sie die Base URL auf https://runapi.ai/v1 und der Fehler verschwindet.

### Schlüssel mit zusätzlichem Leerzeichen kopiert

Paste the key and look for a leading or trailing space. Some terminals and browsers add invisible whitespace when you copy. Delete the field and paste again if in doubt.

### Abgelaufener oder widerrufener Schlüssel

RunAPI-Schlüssel können über das Dashboard widerrufen werden. Wenn Sie Ihren Schlüssel kürzlich neu generiert haben, gibt der alte Wert einen 401-Fehler zurück. Kopieren Sie den neuen Schlüssel aus Dashboard &gt; API Keys.

### Falscher Modell-Slug

Wenn Schlüssel und URL korrekt sind, aber ein bestimmtes Modell einen Fehler zurückgibt, stimmt der Modellname möglicherweise nicht mit dem RunAPI-Katalog überein. Überprüfen Sie den genauen Slug unter runapi.ai/pricing und fügen Sie ihn in das Modellfeld von Cursor ein.


## Lohnt sich Cursor Pro für 20 $/Monat, oder sollten Sie Ihren eigenen Schlüssel verwenden?

Cursor Pro gives you a fixed monthly allowance of fast-model requests. Once you hit the cap, Cursor slows you down or stops until the month resets. BYOK with RunAPI has no cap — you pay per token at 50% of official rates. For most developers, the break-even point is around 8–12 hours of heavy AI coding per month. Below that, RunAPI costs less. Above that, a subscription becomes more predictable but not necessarily cheaper.

## So verwenden Sie Ihren eigenen API-Schlüssel in Cursor mit RunAPI

1. **Kostenloses RunAPI-Konto erstellen** — Gehen Sie zu runapi.ai und melden Sie sich an. Es ist keine Kreditkarte erforderlich. Sie erhalten ein kleines kostenloses Guthaben, um die Verbindung zu testen.
2. **API-Schlüssel und Base URL kopieren** — In the RunAPI dashboard, go to API Keys and generate a key. Copy it right away and note the base URL — it is https://runapi.ai/v1.
3. **Cursor-Einstellungen öffnen** — In Cursor, press Cmd+Shift+J (Mac) or Ctrl+Shift+J (Windows/Linux) to open Settings. Click the Models tab on the left sidebar.
4. **Base URL eingeben** — Scroll to the OpenAI section. Paste https://runapi.ai/v1 into the OpenAI Base URL field. Most guides skip this step — without it, Cursor sends all requests to OpenAI and rejects your key.
5. **Paste your key and click Enable** — Paste your RunAPI key into the OpenAI API Key field. Check that there is no leading or trailing whitespace. Toggle the OpenAI section on if it is off, then click Verify or Enable.
6. **Modell auswählen und testen** — In the Cursor chat bar, choose a model such as gpt-5.4. Send a test message. A response confirms the connection works. Check your RunAPI dashboard under Usage to see the request logged.

## FAQ zur Cursor-API-Schlüssel-Einrichtung

### Warum zeigt Cursor &#39;unauthorized user api key&#39; an?

Dieser Fehler erscheint, wenn Cursor Ihren Schlüssel nicht gegen den angesteuerten Endpunkt authentifizieren kann. Der häufigste Grund ist, dass das Feld OpenAI Base URL leer ist, sodass Cursor Ihren RunAPI-Schlüssel an api.openai.com sendet, das ihn ablehnt. Setzen Sie die Base URL auf https://runapi.ai/v1 zusammen mit Ihrem Schlüssel, um das Problem zu beheben.

### Do I need a Pro version of Cursor to add custom API keys?

No — you do not need a Pro subscription to use your own API key. Cursor lets you add custom API keys on the free plan. Go to Settings &gt; Models, paste your key into the OpenAI API Key field, set the base URL, and you are done. Cursor&#39;s own built-in model requests have separate limits, but those do not apply when you supply your own key.

### Welche Modelle kann ich in Cursor über RunAPI verwenden?

Jedes Modell im RunAPI-Katalog, das einen Chat-Completions-Endpunkt bereitstellt — einschließlich Claude 3.5 Sonnet, Claude 3.7 Sonnet, GPT-4o, GPT-4.1, Gemini 1.5 Pro und Llama 3.1. Geben Sie den genauen Modell-Slug von runapi.ai/pricing in das Modellfeld von Cursor ein. Bild- und Audiomodelle sind in der Chat-Oberfläche von Cursor nicht verfügbar.

### Ist RunAPI günstiger als Cursor Pro?

Für leichte bis moderate Nutzung ja. Cursor Pro für 20 $/Monat eignet sich für Entwickler, die eine Pauschalgebühr bevorzugen. RunAPI berechnet pro Token zu 50 % der Provider-Listenpreise — Claude 3.5 Sonnet kostet 1,50 $/M Eingabe-Tokens. Intensivnutzer, die im Pro-Kontingent bleiben, finden das Abonnement möglicherweise kalkulierbarer, aber bei RunAPI gibt es keine Drosselung.

### Kann ich denselben RunAPI-Schlüssel auch in Windsurf und Claude Code verwenden?

Ja. Ein RunAPI-Schlüssel funktioniert in Cursor, Windsurf, Claude Code, Codex und jedem anderen Tool, das einen benutzerdefinierten OpenAI-kompatiblen Endpunkt akzeptiert. Nutzung und Ausgaben werden in einem RunAPI-Dashboard konsolidiert, sodass Sie keine separaten Schlüssel oder Guthaben pro Tool verwalten müssen.

### Was ist die OpenAI Base URL, die ich in Cursor eingeben muss?

Setzen Sie ihn auf https://runapi.ai/v1. Cursor verwendet diese URL für alle Modellanfragen, wenn der OpenAI-Abschnitt aktiv ist. Ohne dieses Feld sendet Cursor Ihre Anfragen an api.openai.com, das einen RunAPI-Schlüssel ablehnt und jedes Mal einen Unauthorized-Fehler zurückgibt.

### Deaktiviert die Verwendung von BYOK in Cursor die integrierten Cursor-Funktionen?

Nein. Cursors Autocomplete-, Diff-Ansicht- und Agent-Funktionen funktionieren weiterhin. BYOK ändert nur, welches Modell und welchen Endpunkt Cursor für Chat und Inline-Vervollständigungen verwendet. Wenn Sie ein Modell setzen, das die Cursor-Oberfläche nicht standardmäßig auflistet, geben Sie den Slug direkt in den Modellauswähler ein.

### Wie weiß ich, ob mein RunAPI-Schlüssel in Cursor funktioniert?

Senden Sie eine kurze Nachricht im Cursor-Chat und überprüfen Sie das RunAPI-Dashboard unter Usage. Innerhalb weniger Sekunden nach jeder Anfrage erscheint ein neuer Log-Eintrag mit Modellname, Token-Anzahl und Kosten. Wenn kein Eintrag erscheint, erreicht die Base URL oder der Schlüssel RunAPI nicht.

