[{"data":1,"prerenderedAt":386},["ShallowReactive",2],{"doc-\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fbyok":3,"doc-surround-\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fbyok":283,"doc-nav-en":290},{"id":4,"title":5,"body":6,"description":273,"extension":274,"meta":275,"navigation":276,"order":277,"path":278,"section":279,"seo":280,"stem":281,"__hash__":282},"docs_en\u002Fen\u002Fdocs\u002F03.models-billing\u002F14.byok.md","BYOK (Bring Your Own Key)",{"type":7,"value":8,"toc":264},"minimark",[9,13,22,27,63,67,158,161,165,172,194,204,219,223,244,248],[10,11,5],"h1",{"id":12},"byok-bring-your-own-key",[14,15,16,17,21],"p",{},"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 ",[18,19,20],"strong",{},"billed by the vendor at official prices, with zero platform markup",". BYOK coexists with the built-in plan quota, and you can switch anytime.",[23,24,26],"h2",{"id":25},"adding-a-key","Adding a Key",[28,29,30,39,47,55],"steps",{},[31,32,33],"step",{},[14,34,35,38],{},[18,36,37],{},"Get a vendor key",": create an API key in the vendor's console (e.g. Zhipu Open Platform, Volcano Engine Ark).",[31,40,41],{},[14,42,43,46],{},[18,44,45],{},"Open Settings",": in the IDE, go to \"Settings → Models\" and choose to add a vendor configuration.",[31,48,49],{},[14,50,51,54],{},[18,52,53],{},"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.",[31,56,57],{},[14,58,59,62],{},[18,60,61],{},"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.",[23,64,66],{"id":65},"supported-channels","Supported Channels",[68,69,70,83],"table",{},[71,72,73],"thead",{},[74,75,76,80],"tr",{},[77,78,79],"th",{},"Channel",[77,81,82],{},"Base URL",[84,85,86,98,108,118,128,138,148],"tbody",{},[74,87,88,92],{},[89,90,91],"td",{},"Zhipu GLM official",[89,93,94],{},[95,96,97],"code",{},"https:\u002F\u002Fopen.bigmodel.cn\u002Fapi\u002Fpaas\u002Fv4",[74,99,100,103],{},[89,101,102],{},"DeepSeek official",[89,104,105],{},[95,106,107],{},"https:\u002F\u002Fapi.deepseek.com",[74,109,110,113],{},[89,111,112],{},"Qwen official",[89,114,115],{},[95,116,117],{},"https:\u002F\u002Fdashscope.aliyuncs.com\u002Fcompatible-mode\u002Fv1",[74,119,120,123],{},[89,121,122],{},"Kimi official",[89,124,125],{},[95,126,127],{},"https:\u002F\u002Fapi.moonshot.cn\u002Fv1",[74,129,130,133],{},[89,131,132],{},"MiniMax official",[89,134,135],{},[95,136,137],{},"https:\u002F\u002Fapi.minimaxi.com\u002Fv1",[74,139,140,143],{},[89,141,142],{},"Volcano Engine",[89,144,145],{},[95,146,147],{},"https:\u002F\u002Fark.cn-beijing.volces.com\u002Fapi\u002Fv3",[74,149,150,153],{},[89,151,152],{},"SiliconFlow",[89,154,155],{},[95,156,157],{},"https:\u002F\u002Fapi.siliconflow.cn\u002Fv1",[14,159,160],{},"All channels above use the OpenAI-compatible protocol — paste your key and go, no extra adaptation needed.",[23,162,164],{"id":163},"how-keys-are-encrypted-at-rest","How Keys Are Encrypted at Rest",[14,166,167,168,171],{},"Keys are ",[18,169,170],{},"never stored in plaintext"," on the server. The full protection chain:",[173,174,175,182,188],"ol",{},[176,177,178,181],"li",{},[18,179,180],{},"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.",[176,183,184,187],{},[18,185,186],{},"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.",[176,189,190,193],{},[18,191,192],{},"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.",[195,196,198],"callout",{"type":197},"warn",[14,199,200,203],{},[18,201,202],{},"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.",[195,205,207],{"type":206},"tip",[14,208,209,212,213,218],{},[18,210,211],{},"BYOK vs. plans",": BYOK only changes \"whose account model requests go through\" — requests are billed by the provider and never consume plan credits; IDE feature entitlements still follow your plan. See ",[214,215,217],"a",{"href":216},"\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fplans-quota","Plans & Credits",".",[23,220,222],{"id":221},"managing-bound-configurations","Managing Bound Configurations",[224,225,226,232,238],"ul",{},[176,227,228,231],{},[18,229,230],{},"Edit",": update the channel, Base URL, models or the key itself.",[176,233,234,237],{},[18,235,236],{},"Switch selection",": one-click switching among multiple configurations; the selected one applies to all AI features.",[176,239,240,243],{},[18,241,242],{},"Delete",": requests through that configuration stop immediately after deletion, and you can fall back to the hosted pool (credit-billed) anytime.",[23,245,247],{"id":246},"next-steps","Next Steps",[224,249,250,257],{},[176,251,252,253,218],{},"See which models each channel can bind: ",[214,254,256],{"href":255},"\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fmodels","Supported Models",[176,258,259,260,218],{},"Start your first task after configuration: ",[214,261,263],{"href":262},"\u002Fen\u002Fdocs\u002Fguides\u002Frush","RUSH Guide",{"title":265,"searchDepth":266,"depth":266,"links":267},"",2,[268,269,270,271,272],{"id":25,"depth":266,"text":26},{"id":65,"depth":266,"text":66},{"id":163,"depth":266,"text":164},{"id":221,"depth":266,"text":222},{"id":246,"depth":266,"text":247},"Bind your own model-vendor API keys in LingXizhi IDE — add them in Settings, AES-256 encrypted at rest, billed by the vendor with zero platform markup","md",{},true,14,"\u002Fen\u002Fdocs\u002Fmodels-billing\u002Fbyok","Models & Billing",{"title":5,"description":273},"en\u002Fdocs\u002F03.models-billing\u002F14.byok","EkZe7fEfg8At1WBPd9k0qB4ujknHza9N5qJEARFJzp4",[284,286],{"title":217,"path":216,"stem":285,"children":-1},"en\u002Fdocs\u002F03.models-billing\u002F13.plans-quota",{"title":287,"path":288,"stem":289,"children":-1},"Keyboard Shortcuts","\u002Fen\u002Fdocs\u002Freference\u002Fshortcuts","en\u002Fdocs\u002F04.reference\u002F15.shortcuts",[291],{"title":292,"path":293,"stem":294,"children":295,"page":322},"En","\u002Fen","en",[296],{"title":297,"path":298,"stem":299,"children":300,"page":322},"Docs","\u002Fen\u002Fdocs","en\u002Fdocs",[301,323,355,364],{"title":302,"path":303,"stem":304,"children":305,"page":322},"Getting Started","\u002Fen\u002Fdocs\u002Fgetting-started","en\u002Fdocs\u002F01.getting-started",[306,310,314,318],{"title":307,"path":308,"stem":309},"Installation & Download","\u002Fen\u002Fdocs\u002Fgetting-started\u002Finstallation","en\u002Fdocs\u002F01.getting-started\u002F01.installation",{"title":311,"path":312,"stem":313},"Register & Sign In","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fregister-login","en\u002Fdocs\u002F01.getting-started\u002F02.register-login",{"title":315,"path":316,"stem":317},"First-Time Setup","\u002Fen\u002Fdocs\u002Fgetting-started\u002Ffirst-setup","en\u002Fdocs\u002F01.getting-started\u002F03.first-setup",{"title":319,"path":320,"stem":321},"Migrate from VS Code","\u002Fen\u002Fdocs\u002Fgetting-started\u002Fmigrate-from-vscode","en\u002Fdocs\u002F01.getting-started\u002F04.migrate-from-vscode",false,{"title":324,"path":325,"stem":326,"children":327,"page":322},"Feature Guides","\u002Fen\u002Fdocs\u002Fguides","en\u002Fdocs\u002F02.guides",[328,332,335,339,343,347,351],{"title":329,"path":330,"stem":331},"AI Chat & Inline Edit","\u002Fen\u002Fdocs\u002Fguides\u002Fai-chat","en\u002Fdocs\u002F02.guides\u002F05.ai-chat",{"title":333,"path":262,"stem":334},"RUSH Deep Task","en\u002Fdocs\u002F02.guides\u002F06.rush",{"title":336,"path":337,"stem":338},"FIM Code Completion","\u002Fen\u002Fdocs\u002Fguides\u002Ffim-completion","en\u002Fdocs\u002F02.guides\u002F07.fim-completion",{"title":340,"path":341,"stem":342},"Semantic Code Graph","\u002Fen\u002Fdocs\u002Fguides\u002Fcode-graph","en\u002Fdocs\u002F02.guides\u002F08.code-graph",{"title":344,"path":345,"stem":346},"MCP Tools & Marketplace","\u002Fen\u002Fdocs\u002Fguides\u002Fmcp","en\u002Fdocs\u002F02.guides\u002F09.mcp",{"title":348,"path":349,"stem":350},"Debugging & DAP","\u002Fen\u002Fdocs\u002Fguides\u002Fdebugging","en\u002Fdocs\u002F02.guides\u002F10.debugging",{"title":352,"path":353,"stem":354},"Integrated Terminal","\u002Fen\u002Fdocs\u002Fguides\u002Fterminal","en\u002Fdocs\u002F02.guides\u002F11.terminal",{"title":279,"path":356,"stem":357,"children":358,"page":322},"\u002Fen\u002Fdocs\u002Fmodels-billing","en\u002Fdocs\u002F03.models-billing",[359,362,363],{"title":360,"path":255,"stem":361},"Models","en\u002Fdocs\u002F03.models-billing\u002F12.models",{"title":217,"path":216,"stem":285},{"title":5,"path":278,"stem":281},{"title":365,"path":366,"stem":367,"children":368,"page":322},"Reference & FAQ","\u002Fen\u002Fdocs\u002Freference","en\u002Fdocs\u002F04.reference",[369,370,374,378,382],{"title":287,"path":288,"stem":289},{"title":371,"path":372,"stem":373},"Configuration","\u002Fen\u002Fdocs\u002Freference\u002Fconfiguration","en\u002Fdocs\u002F04.reference\u002F16.configuration",{"title":375,"path":376,"stem":377},"Kernel API","\u002Fen\u002Fdocs\u002Freference\u002Fkernel-api","en\u002Fdocs\u002F04.reference\u002F17.kernel-api",{"title":379,"path":380,"stem":381},"FAQ","\u002Fen\u002Fdocs\u002Freference\u002Ffaq","en\u002Fdocs\u002F04.reference\u002F18.faq",{"title":383,"path":384,"stem":385},"Cloud REST API","\u002Fen\u002Fdocs\u002Freference\u002Fcloud-api","en\u002Fdocs\u002F04.reference\u002F19.cloud-api",1788542300833]