Cursor

Point Cursor's custom OpenAI base URL at this gateway and use 70+ text models in Cursor Chat

Cursor supports a custom OpenAI API under Settings → Models.

Setup#

  1. Open Cursor → ⚙️ SettingsModels
  2. Scroll to the bottom → the OpenAI API Key section
  3. Tick Override OpenAI Base URL
  4. Fill in:
    • Base URL: https://dianqi.zsopc.com/v1
    • API Key: sk-gpushare-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (sk-gpushare- plus 64 hex characters, 76 in total)
  5. In the model list above, Add Model and enter the model IDs you want, for example:
    • claude-sonnet-4-6
    • gpt-5.5
    • glm-5.1
    • gemini-2.5-pro
    • Full list: Models
  6. Untick Cursor's built-in OpenAI models (gpt-4o, gpt-4o-mini and friends) — they aren't in our catalog, and leaving them on makes the next step fail
  7. Click Verify to confirm the connection

Why add models before verifying? Cursor's Verify sends a test request using whichever models are currently enabled. If the built-in gpt-4o is still ticked, the gateway returns model_not_found — and Verify fails even though your base URL and key are both correct.

What actually goes through the gateway#

Cursor speaks the OpenAI Chat protocol, so the available models are every text model returned by GET /v1/models (70+ and growing). See the compatibility matrix and Models. Image, video and embedding models use separate endpoints and don't go through this protocol — see Image / video / music APIs.

Things to know#

Composer, Agent and Tab autocomplete use Cursor's own service#

  • Cursor Chat — ✅ uses the custom base URL you configured (this platform)
  • Composer (Cmd+I) — ❌ goes to Cursor's own service, not through this gateway
  • Tab autocomplete — ❌ same
  • Agent (Cmd+Shift+I) — ❌ same

There is currently no official way to route all of Cursor through this gateway; Cursor ties those features to its subscription.

Suggested split#

SituationUse
Long conversations / complex tasksCursor Chat (through this gateway, with Claude or GPT-5.x)
Short completions / inline editsCursor's native features (included in the subscription)
Full AI coding through this gatewayFlopCode or Cline

Troubleshooting#

SymptomWhat to check
Verify fails but the URL and key are rightCursor's built-in OpenAI models (gpt-4o etc.) aren't in our catalog, so the gateway returns model_not_found. Turn them off, leave only the model IDs you added, then verify again
Verify fails, no connectionBase URL spelling — /v1 is required
Model missing from the dropdownYou must Add Model with the model ID first
401 (invalid_api_key)Key invalid, revoked or expired. Check you copied the whole thing (sk-gpushare- plus 64 hex characters); the full key can be re-revealed any time on its console detail page
400 (model_not_allowed)This key has an allowed_models allowlist that excludes the model → edit it in the console or use an unrestricted key
402 (insufficient_quota, code quota_exceeded)Account balance exhausted. Every key shares one balance, so a new key won't help → top up at dflop.top/dashboard/billing (Stripe, $1 minimum)

Full error reference: Error handling.

Other clients#