GPT-5免费使用教程 - Windows安装Codex配置AgentRouter完整指南2025

GPT-5免费使用教程 - Windows安装Codex配置AgentRouter完整指南2025

这家目前免费,额度也比较大,白嫖只需要GitHub账号,后面换号应该可以接着嫖。以后能不能用不知道,至少现在可以用。

 1、agentrouter获取免费200$ 额度:

https://agentrouter.org/register?aff=tm0U

2、获取api令牌。

api令牌——添加令牌——额度可以选择无限额度

3、设置系统环境变量/

Windows系统,win+s 搜索,环境变量,编辑环境变量:

变量名为 AGENT_ROUTER_TOKEN ,值为你第2步申请的令牌

4、配置文件。

Windows创建文件夹:C:Users你Windows用户名.codex

在文件夹里创建文件:config.toml20250918163241394961

model = "gpt-5"
model_provider = "openai-chat-completions"
preferred_auth_method = "apikey"


[model_providers.openai-chat-completions]
name = "OpenAI using Chat Completions"
base_url = "https://agentrouter.org/v1"
env_key = "AGENT_ROUTER_TOKEN"
wire_api = "chat"
query_params = {}

另一个文件 auth.json

{
 "OPENAI_API_KEY":"第2步申请的api令牌"
}

20250918163327837162

5、安装 node 以及 codex

先下载安装node:https://nodejs.org/dist/v24.8.0/node-v24.8.0-x64.msi

安装 codex

# 或使用 npm 安装
npm install -g @openai/codex

# 使用 pnpm 安装
pnpm install -g @openai/codex

6、运行及简单使用

cmd或者powershell 执行 命令,即可运行。

codex

 

/model 设置模型

/quit 退出codex

要他执行系统命令可以,Run: commands

 

20250918163423452090

THE END