Models & Billing / BYOK (Bring Your Own Key)

BYOK (Bring Your Own Key)

If you already have API keys from vendors such as Zhipu, DeepSeek, Qwen, Kimi, MiniMax or Volcano Engine, you can bind them directly in LingXizhi IDE: requests are billed by the vendor at official prices, with zero platform markup. BYOK coexists with the built-in plan quota, and you can switch anytime.

Adding a Key

1

Get a vendor key: create an API key in the vendor's console (e.g. Zhipu Open Platform, Volcano Engine Ark).

2

Open Settings: in the IDE, go to "Settings → Models" and choose to add a vendor configuration.

3

Fill in the configuration: pick a vendor channel (the official Base URL is filled in automatically), paste the API key, and select the models to use.

4

Save and select: once the new configuration is set as the selected one, AI chat, inline edit and RUSH tasks immediately switch to sending requests with your key.

Supported Channels

ChannelBase URL
Zhipu GLM officialhttps://open.bigmodel.cn/api/paas/v4
DeepSeek officialhttps://api.deepseek.com
Qwen officialhttps://dashscope.aliyuncs.com/compatible-mode/v1
Kimi officialhttps://api.moonshot.cn/v1
MiniMax officialhttps://api.minimaxi.com/v1
Volcano Enginehttps://ark.cn-beijing.volces.com/api/v3
SiliconFlowhttps://api.siliconflow.cn/v1

All channels above use the OpenAI-compatible protocol — paste your key and go, no extra adaptation needed.

How Keys Are Encrypted at Rest

Keys are never stored in plaintext on the server. The full protection chain:

  1. AES-256-GCM encryption: a 32-byte encryption key is derived from the master key via SHA-256; encryption uses AES-256-GCM with a random nonce, and the ciphertext carries integrity verification.
  2. 2-of-3 key sharding: the encrypted key seed is XOR-split into 3 shards, any 2 of which can restore it — two shards are delivered locally, while the third stays on the server and expires automatically with the key's validity period.
  3. Ownership isolation: each configuration belongs only to the current account. You can save multiple vendor configurations, but only the selected one takes effect at a time.
!

Security advice: create a dedicated key for LingXizhi and set a spending cap in the vendor console. When changing devices or suspecting a leak, revoke the old key in the vendor console first, then delete the corresponding configuration in Settings.

BYOK vs. plans: BYOK only changes "whose account model requests go through" — IDE feature entitlements still follow your plan. AI chat, inline edit and FIM completion never count as Agent runs; see Plans & Quota.

Managing Bound Configurations

  • Edit: update the channel, Base URL, models or the key itself.
  • Switch selection: one-click switching among multiple configurations; the selected one applies to all AI features.
  • Delete: requests through that configuration stop immediately after deletion, and you can fall back to the plan's built-in quota anytime.

Next Steps