Codex CLI 告别付费账单:awesome-freellm-apis 免费 LLM 后端环境变量配置详解Codex CLI Says Goodbye to Paid Bills: Configuring Free LLM Backends with awesome-freellm-apis Environment Variables


AI free token/AI免费积分

Codex CLI 告别付费账单:awesome-freellm-apis 免费 LLM 后端环境变量配置详解

本文来源:http://www.lpqz.cn/news/178622
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

Codex CLI告别付费账单awesome-freellm-apis 免费LLM后端环境变量配置详解【免费下载链接】awesome-freellm-apis134 free LLM APIs AI API keys from 40 providers. Google Gemini, NVIDIA NIM, Groq, OpenRouter more. One-click setup for Claude Code, Cursor and Codex.项目地址: https://gitcode.com/gh_mirrors/aw/awesome-freellm-apisawesome-freellm-apis是一个每日更新的免费 LLM API 目录收录 508 个免费大模型 API覆盖 Google Gemini、NVIDIA NIM、Groq、OpenRouter 等 31 个提供

商。对 Codex CLI 用户来说它最实用的价值在于只需修改OPENAI_BASE_URL和OPENAI_API_KEY两个环境变量就能把 Codex 指向任意免费 LLM 后端——体验与付费 API 一致账单归零。本文用 3 步带你完成 Codex CLI 免费 LLM 后端的环境变量配置全程无需信用卡。为什么 Codex CLI 能零成本运行环境变量工作原理Codex CLI 启动时会读取两个环境变量OPENAI_BASE_URL—— 决定请求发往哪个 API 服务OPENAI_API_KEY—— 决定使用哪个密钥认证只要把这两个值指向免费的 OpenAI 兼容后端Codex CLI 的行为和用法完全不变但费用为零。本仓库收录的所有提供商都暴露 OpenAI 兼容端点因此换个 base URL 换个 key即可直接切换。原理说明见 code-examples/codex.md。第一

步把免费 LLM 环境变量写入 shell 配置一次设置永久生效每次都要敲一遍export很烦。把配置追加到~/.zshrc或~/.bashrc末尾以后每次打开终端自动生效# Codex CLI 免费 LLM API 后端 export OPENAI_BASE_URLhttps://api.groq.com/openai/v1 export OPENAI_API_KEYgsk_your_key_here保存后执行source ~/.zshrc或重开终端即可。原始配置片段见 code-examples/codex.md。Codex 免费模型怎么选按使用场景匹配不同免费模型各有擅长Codex 场景下建议这样选使用场景推荐免费模型快速补全Groq Llama 3.3 70B、Cerebras Llama 3.1 70B复杂推理DeepSeek R1OpenRouter / NVIDIA NIM长

上下文Gemini 2.5 Flash1M 上下文工具调用Llama 3.3 70B、Qwen3 Coder 480B代码生成Qwen3 Coder、DeepSeek R1、GPT-OSS 120B场景对照表原文见 code-examples/codex.md。免费 LLM 后端踩坑清单3 个最常见的坑 ⚠️模型 ID 必须精确匹配—— 模型名要和提供商后台的模型 ID 一字不差写错一个字符就会报模型不存在工具调用兼容性—— Codex 依赖 OpenAI 兼容的 tool calling并非所有免费模型都支持推荐 Llama 3.3 70B 及以上、DeepSeek R1出错时先换更强的模型免费额度有速率限制—— 所有免费层都有 RPM/RPD 限制遇到 rate limit 报错换一家后端即可避坑说明见 code-examples/codex.md。延伸阅读awesome-freell

m-apis 项目结构与文件导航 想查看完整的模型目录或贡献数据先克隆仓库git clone https://gitcode.com/gh_mirrors/aw/awesome-freellm-apis主要文件导航文件内容README.md31 个提供商目录、Base URL 速查表、各提供商最佳免费模型每日更新README.zh-CN.md简体中文版主文档code-examples/codex.md本文主角Codex CLI 免费 LLM 后端配置code-examples/claude-code.mdClaude Code 免费后端配置ANTHROPIC_BASE_URL方案code-examples/cursor.mdCursor 免费后端配置CONTRIBUTING.md贡献指南新增 API、修正额度数据仓库整体结构说明见 README.md。同一个两个环境变量换后端的思路也适用于

Claude Code 和 Cursor——一份目录覆盖你所有 AI 开发工具。小结两个环境变量一套免费 LLM 后端Codex CLI 从此告别付费账单。【免费下载链接】awesome-freellm-apis134 free LLM APIs AI API keys from 40 providers. Google Gemini, NVIDIA NIM, Groq, OpenRouter more. One-click setup for Claude Code, Cursor and Codex.项目地址: https://gitcode.com/gh_mirrors/aw/awesome-freellm-apis创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

Codex CLI Says Goodbye to Paid Bills: Configuring Free LLM Backends with awesome-freellm-apis Environment Variables

本文来源:http://www.lpqz.cn/news/178622
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

The awesome-freellm-apis repository collects 134 free LLM API sources from 40 providers, including Google Gemini and Nvidia models, and is mirrored on GitCode for easy access. For Codex CLI users its most practical value is that changing just two environment variables — OPENAI_BASE_URL and OPENAI_API_KEY — points Codex at any compatible free backend, giving the same developer experience as a paid API with a zero bill.

The setup takes three steps. First, pick a provider and model from the catalog and copy its base URL and key. Second, export the two variables in the terminal and run Codex CLI as usual. Third, append the exports to the end of ~/.zshrc or ~/.bashrc so they take effect automatically in every new shell instead of being typed each time — a permanent configuration in one line.

Model choice depends on the job: large-context work can use Gemini 2.5 Flash with its one-million-token window and tool calling, while code generation suits Llama 3.3 70B, Qwen3 Coder 480B, DeepSeek R1 or GPT-OSS 120B. The repository's code-examples/codex.md contains a scenario comparison table, and the README lists 31 provider directories plus a base-URL cheat sheet and per-provider notes. To browse the full model catalog or contribute data, clone the repo from the GitCode mirror and navigate from README.md into the provider folders.

The same directory also covers Claude Code and Cursor, so one catalog can serve several AI development tools at once. The article closes with a troubleshooting checklist for free backends — rate limits, unstable endpoints and models that lack tool calling are the usual traps — before wrapping up: two environment variables and one free backend are enough to take Codex CLI off a paid plan.

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry