codeX集成deepSeek的API key步骤教程

📋 准备工作

  1. 拥有 DeepSeek API Key :在 DeepSeek 平台注册并充值,拿到了一个以 sk- 开头的 API Key。
  2. 安装 Codex 客户端:安装 Codex(比如 ChatGPT 桌面应用、Codex CLI 或 VS Code 扩展),并且至少运行过一次,这样才会在本地生成配置文件目录。
  3. 用这个sk-开头的key登录chatGPT。

⚙️ 安装与配置

  1. 以管理员身份打开 PowerShell(在开始菜单搜索 PowerShell,右键选择"以管理员身份运行")。

  2. 执行安装命令 :复制并粘贴以下命令到 PowerShell 窗口,按回车:

    powershell 复制代码
    irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex
  3. 选择模型 :脚本启动后会显示菜单,输入 1 选择 deepseek-v4-flash 模型。

  4. 输入 API Key :根据脚本提示,粘贴你的 DeepSeek API Key(以 sk- 开头),然后按回车。

✅ 验证是否成功

脚本执行完毕后,检查以下几点:

  • 查看输出日志,确认出现 [OK] Installation complete. 字样。
  • 如果使用 ChatGPT 桌面应用 ,重启后查看右下角,应该显示 deepseek-v4-flash 模型名称。
  • 如果使用 Codex CLI ,启动时命令行横幅会显示 model: deepseek-v4-flash。
bash 复制代码
[OK] Backed up config.toml -> C:\Users\Admin\.codex\backup-deepseek\config.toml
[OK] Wrote C:\Users\Admin\.codex\models.json (contains deepseek-v4-flash and deepseek-v4-pro)
[OK] Updated C:\Users\Admin\.codex\config.toml

Changes made to your existing configuration (2 total)
  - Rewrote model: "gpt-5.6-sol" -> "deepseek-v4-flash"
  - Rewrote model_reasoning_effort: "low" -> "high"

Configuration written
  model                  = "deepseek-v4-flash"
  model_provider         = "deepseek"
  preferred_auth_method  = "apikey"
  forced_login_method    = "api"
  model_reasoning_effort = "high"
  model_catalog_json     = "C:/Users/Admin/.codex/models.json"

  [model_providers.deepseek]
  base_url  = "https://api.deepseek.com/"
  wire_api  = "responses"

Validation
[OK] models.json is valid JSON
[OK] config.toml has no duplicate top-level keys

[OK] Installation complete.

How to verify it took effect:
  - ChatGPT desktop app: after launch, the bottom-right corner showing the DeepSeek model name means success
    (that is deepseek-v4-flash; if it still shows "Custom", models.json was not loaded)
  - Codex CLI: the startup banner shows model: deepseek-v4-flash

If the logs show "fallback model metadata" or "Unknown model",
models.json was not loaded -- please reinstall.

How to switch / restore
Your original configuration was backed up to C:\Users\Admin\.codex\backup-deepseek
Just run this script again:

  irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex

  Pick 1/2 to switch between flash / pro, or 3 to restore the pre-install configuration.

提问codeX它的底层模型

💡 后续管理

  • 切换模型 :再次运行安装命令,选 1(Flash)或 2(Pro,如果可用)。
  • 恢复原配置 :再次运行安装命令,选 3,即可一键恢复到安装前的状态(比如 OpenAI 的默认模型)。
相关推荐
木土雨成小小测试员23 分钟前
WorkBuddy的安装使用教程详解
ai
Martina_03212 小时前
AI生成的海岸城市一移动镜头,水面反射就跳?用6步统一反射探针、SSR与平面反射
图像处理·人工智能·平面·3d·ai·自然语言处理·游戏策划
tianyatest3 小时前
给 AI Agent 写了个 Skill:扫描版电子书自动解压合并 + 加书签(附 PDG 格式逆向)
ai·pdf·电子书
风花一世月4 小时前
[特殊字符] 我把一套分布式消防方案做成了能跑的 3D 沙盘(三架无人机共用一根水带,在线直接玩)
分布式·3d·ai·无人机
GalaxyMeteor4 小时前
Windows 本地部署 Sam3 模型笔记(含Demo)
ai
秋饼4 小时前
Java 后端企业级 LLM 网关实战:Spring Cloud Gateway 构建统一大模型接入层
java·ai·技术分享·后端开发
赛博仓鼠5 小时前
Vidu Q4 Preview实测:15张参考图+3段音频驱动,2K/4K输出,国产视频生成新标杆
ai·aigc·音视频
粥里有勺糖6 小时前
Windows 搭建 ComfyUI 环境 | 小白也能直接上手
ai·经验总结·comfyui
袖清暮雨7 小时前
机器学习之其他聚类(层次聚类+DBSCAN算法)
人工智能·机器学习·ai·聚类
ofoxcoding7 小时前
Gemini TTS 与 ElevenLabs 语音合成实测:同一段视频旁白效果对比
ai·ffmpeg·音视频