跳至主要內容
所有用戶端
AI Code Editor · Override OpenAI Base URL1M Context · ZDR

Cursor

Connect Cursor Composer, Agent, and Chat to bf16.ai uncensored models via Override OpenAI Base URL.

基礎網址
https://api.bf16.ai/v1
協定
openai-completions

適用對象
Cursor IDE users who hit safety refusals during vulnerability patching, decompilation, or game/novel localization and want an uncensored model in Composer.

架構原理與接入優勢

Cursor Settings → Models → OpenAI API Key + Override OpenAI Base URL pointed at https://api.bf16.ai/v1
Cursor routes custom model IDs added under Models through its Override OpenAI Base URL setting directly to https://api.bf16.ai/v1.

Cursor allows you to bring your own OpenAI-compatible API key and override the OpenAI Base URL inside Cursor Settings → Models. This lets you keep Cursor Tab autocomplete running as usual while switching Composer / Agent chat to `zai-org/glm-5.3-uncensored` or `deepseek/deepseek-v4.1-flash-uncensored` whenever a stock model refuses to inspect obfuscated code, security exploits in your own repo, or mature narrative scripts.

Important Cursor quirk: when you click "Verify" on the OpenAI API Key section, Cursor sends a test request using whichever model sits first in your enabled Models list. Adding a bf16.ai model ID and temporarily unchecking stock `gpt-*` entries ensures Cursor’s Verify button passes immediately.

指令預設顯示 $BF16_API_KEY。登入並建立金鑰後會自動填入你的真實金鑰。

一鍵快速配置

One-Command Endpoint & Key Smoke Check for Cursor

Verifies that your bf16.ai API key can reach zai-org/glm-5.3-uncensored over Chat Completions before pasting into Cursor Settings → Models.

export BF16_API_KEY="sk-bf16-v1-..."
curl -fsS "https://api.bf16.ai/v1/chat/completions" \
  -H "Authorization: Bearer $BF16_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek/deepseek-v4.1-flash-uncensored","messages":[{"role":"user","content":"Reply OK."}],"max_tokens":16}' && echo ""
  1. 1

    Add bf16 Model IDs in Cursor Settings → Models

    Press Cmd+Shift+J (macOS) or Ctrl+Shift+J (Windows/Linux) to open Cursor Settings → Models. Click "+ Add model" and add the exact model IDs below, and uncheck stock gpt-4o entries while verifying your custom OpenAI key.

    zai-org/glm-5.3-uncensored
    deepseek/deepseek-v4.1-flash-uncensored
    moonshotai/kimi-k3.1-pro-uncensored
  2. 2

    Set OpenAI API Key & Override OpenAI Base URL

    Scroll down to OpenAI API Key, paste your key, expand "Override OpenAI Base URL", enter https://api.bf16.ai/v1, click Save next to the URL, and toggle the switch ON.

    OpenAI API Key:           $BF16_API_KEY
    Override OpenAI Base URL: https://api.bf16.ai/v1
  3. 3

    Select the Model in Cursor Composer

    Open Composer (Cmd+I) or Chat (Cmd+L), pick zai-org/glm-5.3-uncensored from the model dropdown, and send a prompt.

Cursor — Cursor Settings (⌘⇧J) → Models
介面與設定檔欄位對照
Cursor Settings / Models / API Keys → OpenAI API Key

關鍵參數核對清單

Model Names (+ Add Model)
zai-org/glm-5.3-uncensored, deepseek/deepseek-v4.1-flash-uncensored, moonshotai/kimi-k3.1-pro-uncensored

Add these exact IDs to the Models list and toggle them ON.

OpenAI API Key
sk-bf16-v1-••••••••••••
Override OpenAI Base URL (Toggle ON)
https://api.bf16.ai/v1

Must include /v1 and Save before clicking Verify.

Remember to click the small Save button inside the Override OpenAI Base URL input box before toggling the master OpenAI API Key switch ON.

推薦模型分層配置

架構規劃使用旗艦模型,高頻子任務與螢幕截圖使用 Flash 模型以節省開銷。

工作流角色模型 ID選型說明USD / 1M Tokens
Cursor Agent & Multi-File Composerzai-org/glm-5.3-uncensoredReliable file-edit tool calls and deep codebase reasoning.$1.35 in / $0.25 cached / $4.20 out
Fast Inline Chat & Screenshot Debuggingdeepseek/deepseek-v4.1-flash-uncensoredAccepts pasted UI screenshots and streams fast edits.$0.26 in / $0.045 cached / $1.00 out
2.8T Complex Architecture & Visionmoonshotai/kimi-k3.1-pro-uncensoredFlagship multimodal reasoning for hard architectural refactors.$1.95 in / $0.28 cached / $6.90 out

如何確認設定成功

  • Clicking Verify in Cursor Settings → Models succeeds without model_not_found.
  • Composer responses stream cleanly and appear in bf16.ai/dashboard/logs.
  • curl https://api.bf16.ai/v1/models -H "Authorization: Bearer $BF16_API_KEY"

生產環境護欄與預算隔離

  • Cursor relays custom-key requests through Cursor’s backend servers to your custom Base URL; do not restrict IP CIDR on your Cursor key to your home IP.
  • Set a daily USD cap on your Cursor key in /dashboard/keys to bound long Composer indexing loops.

常見錯誤

現象
Cursor Verify fails with 404 model_not_found for gpt-4o.
原因
A stock OpenAI model (such as gpt-4o) is still checked in the Models list, so Cursor used it for the verification ping.
解法
Uncheck stock gpt-* models in Cursor Settings → Models, leave zai-org/glm-5.3-uncensored checked, and click Verify again.
現象
403 IP allowlist rejection from Cursor.
原因
Cursor’s cloud proxy forwards custom OpenAI-compatible calls from Cursor egress IPs rather than your workstation IP.
解法
Leave CIDR allowlist empty on the API key dedicated to Cursor.