家

/

ニュース

/

Cursor Custom API Setup: A Step-by-Step Guide to Configuring Your Own Model Provider

Cursor Custom API Setup: A Step-by-Step Guide to Configuring Your Own Model Provider

Cursor Custom API Setup: A Step-by-Step Guide to Configuring Your Own Model Provider

A

AnBoWork 編集

·

2026/9/25

·

7 分で読みました

TL;DR

Cursor supports a custom API override for teams that already have a gateway key. Here's the full setup path, plus the mistakes that make it look broken when it isn't.

Cursor ships with built-in access to several models out of the box, but its settings also expose a path for pointing the editor at a custom OpenAI-compatible endpoint — useful if you already have a gateway key covering several providers and would rather not manage a second, separate subscription just for your editor.

Where this setting lives

Cursor's model settings include an option to override the API base URL and supply your own API key for OpenAI-compatible models (and separately for Anthropic-compatible Claude models). The exact menu labels shift between Cursor releases, so the safest approach is searching the in-app settings for "API Key" or "Override" rather than following a fixed click-path from an older screenshot.

What "OpenAI-compatible" means for Cursor specifically

Cursor's custom-provider slot expects the same request/response shape as OpenAI's Chat Completions API. Any gateway that speaks that format — regardless of which model actually processes the request upstream — works without Cursor needing to know anything changed.

Setting it up

Six steps to a working override
Six steps to a working override
  1. Open Cursor's settings and find the model provider section.
  2. Enable the custom API / override option for OpenAI-compatible models.
  3. Paste in your gateway's base URL.
  4. Paste in your gateway API key.
  5. Select (or manually type) the model identifier you want to use by default.
  6. Send a test message in a new chat to confirm the override is active rather than silently falling back to Cursor's default provider.

How do I confirm the override actually took effect?

The most reliable check is usage attribution: if requests show up in your gateway's usage dashboard immediately after a test message, the override is live. If nothing shows up after a minute, Cursor is likely still using its built-in default.

Common configuration mistakes

MistakeWhat happensFix
Base URL includes a trailing path segment meant for a different SDKRequests 404 or return malformed responsesUse exactly the base URL your gateway documents, no extra path appended
API key pasted with a leading/trailing spaceSilent 401 that looks like a Cursor bugRe-paste the key directly from the dashboard, avoid retyping
Model identifier doesn't match any model the gateway maps"Model not found" style errorCopy the exact model string from the gateway's supported-models list

Why point Cursor at a gateway instead of its built-in models?

Two reasons come up repeatedly: model choice and consolidated billing. Cursor's built-in options are necessarily a curated subset; a gateway that exposes Claude, GPT, DeepSeek, GLM, Kimi, Qwen, Llama, and Grok behind one key lets you pick per-task rather than per-editor-default, and keeps the spend on one invoice instead of split across your editor subscription and a separate API account.

Is this worth doing if I only use Cursor occasionally?

If your usage is light, the built-in defaults are usually simpler. The override pays off once you're already paying for a gateway key elsewhere and want Cursor on the same ledger, or once you specifically need a model Cursor doesn't offer by default.

PioModel's API keys work directly in Cursor's custom-provider slot with no translation layer in between, since the endpoint is OpenAI-compatible by design.

pillar:ide-integration
Cursor
Custom API
base_url
PioModel

AnBoWork から始めましょう

クロード、GPT、Gemini などの 1 つのキー — 従量課金制で、個別のアカウントは必要ありません。

コメント

サインインしてディスカッションに参加してください

AnBoWork クライアントをダウンロード

ネイティブログイン · 出口とタイムゾーンを常に一致

Claude Code・Codex・Antigravity を 1 つのウィンドウで、ご自身のアカウントでネイティブにログイン。専用の固定 IP と組み合わせれば、出口・タイムゾーン・環境が一貫します。無料ダウンロード。