[{"data":1,"prerenderedAt":117},["ShallowReactive",2],{"guide-zh-configure-byok":3},{"id":4,"title":5,"body":6,"description":107,"extension":108,"meta":109,"navigation":112,"path":113,"seo":114,"stem":115,"__hash__":116},"pages\u002Fzh\u002Fguides\u002Fconfigure-byok.md","配置 BYOK",{"type":7,"value":8,"toc":99},"minimark",[9,13,17,21,30,33,64,67,70,73],[10,11,5],"h1",{"id":12},"配置-byok",[14,15,16],"p",{},"Bring Your Own Key 让你控制模型成本与合规。WriteX 只在本机转发请求。",[18,19,20],"h2",{"id":20},"开始之前",[14,22,23,24,29],{},"向 Provider 申请 API Key 或网关地址；确认公司网络允许访问该端点。各厂商图文教程见 ",[25,26,28],"a",{"href":27},"\u002Fdoc\u002Fget-key","文档 · 获取 API Key","。",[18,31,32],{"id":32},"步骤",[34,35,36,44,55,58,61],"ol",{},[37,38,39,40,29],"li",{},"打开 ",[41,42,43],"strong",{},"设置 → 模型 \u002F Provider",[37,45,46,47,50,51,54],{},"选择官方 Provider（如 ",[41,48,49],{},"DeepSeek","、小米 MiMo、OpenAI 等），或 ",[41,52,53],{},"OpenAI 兼容 \u002F 自定义"," 并填写 Base URL。",[37,56,57],{},"粘贴 API Key 并保存（存储于本机加密区）。",[37,59,60],{},"在 Agent 中发送测试消息，确认返回正常。",[37,62,63],{},"在设置中指定助手输出语言（可与界面语言不同）。",[18,65,66],{"id":66},"提示与最佳实践",[14,68,69],{},"不要把 Key 提交进 Git。轮换 Key 时在 Provider 控制台吊销旧 Key。",[18,71,72],{"id":72},"相关阅读",[74,75,76,81,87,93],"ul",{},[37,77,78],{},[25,79,80],{"href":27},"获取 API Key",[37,82,83],{},[25,84,86],{"href":85},"\u002Ffeatures\u002Fai-agent","AI Agent 功能",[37,88,89],{},[25,90,92],{"href":91},"\u002Ffaq\u002Fwhich-models-supported","支持哪些模型",[37,94,95],{},[25,96,98],{"href":97},"\u002Fguides\u002Fagent-writing-workflow","Agent 写作工作流",{"title":100,"searchDepth":101,"depth":101,"links":102},"",2,[103,104,105,106],{"id":20,"depth":101,"text":20},{"id":32,"depth":101,"text":32},{"id":66,"depth":101,"text":66},{"id":72,"depth":101,"text":72},"在 WriteX 中安全保存 Provider 端点与 API Key，启用 AI Agent 而无需 WriteX 账号。","md",{"seoTitle":110,"summary":111,"order":101},"配置 BYOK API Key | WriteX","一次配置，本地加密保存 Key。",true,"\u002Fzh\u002Fguides\u002Fconfigure-byok",{"title":5,"description":107},"zh\u002Fguides\u002Fconfigure-byok","1VGeyIh0dta6DVG8CmW5SGpbSEMZ04gv6sUqPHwe2wA",1785483019433]