gpt4free
67,033
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
Python
语言
创建时间
最近更新
项目能做什么
gpt4free 官方仓库,聚合了多种强大的大语言模型。
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# GPT4Free (g4f)
[](https://pypi.org/project/g4f) [](https://hub.docker.com/r/hlohaus789/g4f) [](https://www.gnu.org/licenses/gpl-3.0.txt) [](https://pepy.tech/projects/g4f) 
<p align="center">
<!--img src="https://g4f.dev/docs/images/477107515-7f60c240-00fa-4c37-bf7f-ae5cc20906a1.png" alt="GPT4Free logo" height="200" /-->
[<img alt="Community Day 2026" src="https://g4f.dev/community-day-2026/awards/Start.jpeg" />](https://g4f.dev/community-day-2026/awards/)
</p>
<p align="center">
<span style="background: linear-gradient(45deg, #12c2e9, #c471ed, #f64f59); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">
<strong>Created by <a href="https://github.com/xtekky">@xtekky</a>,<br> maintained by <a href="https://github.com/hlohaus">@hlohaus</a></strong>
</span>
</p>
<p align="center">
<span>Support the project on</span>
<a href="https://github.com/sponsors/hlohaus" target="_blank" rel="noopener noreferrer">
GitHub Sponsors
</a>
❤️
</p>
<p align="center">
Live demo & docs: https://g4f.dev | Documentation: https://g4f.dev/docs
</p>
---
GPT4Free (g4f) is a community-driven project that aggregates multiple accessible providers and interfaces to make working with modern LLMs and media-generation models easier and more flexible. GPT4Free aims to offer multi-provider support, local GUI, OpenAI-compatible REST APIs, and convenient Python and JavaScript clients — all under a community-first license.
This README is a consolidated, improved, and complete guide to installing, running, and contributing to GPT4Free.
Table of contents
- [What’s included](#whats-included)
- [Quick links](#quick-links)
- [Requirements & compatibility](#requirements--compatibility)
- [Installation](#installation)
- [Docker (recommended)](#docker-recommended)
- [Slim Docker image](#slim-docker-image)
- [Sandbox desktop (Docker)](#sandbox-desktop-docker)
- [Windows (.exe)](#windows-exe)
- [Python (pip / from source / partial installs)](#python-pip--from-source--partial-installs)
- [Running the app](#running-the-app)
- [GUI (web client)](#gui-web-client)
- [FastAPI / Inference API](#fastapi--inference-api)
- [CLI](#cli)
- [Optional provider login (desktop in container)](#optional-provider-login-desktop-in-container)
- [Using the Python client](#using-the-python-client)
- [Synchronous text example](#synchronous-text-example)
- [Image generation example](#image-generation-example)
- [Async client example](#async-client-example)
- [Using GPT4Free.js (browser JS client)](#using-gpt4freejs-brow
阅读完整原文
商业机会分析 AI 生成
合规化多厂商LLM聚合网关与成本优化SaaS
| 产品构想 | 脱离逆向接口依赖,基于其FastAPI与OpenAI兼容架构,转向聚合各厂商正规API(OneAPI类产品路线),提供智能路由、容灾重试、缓存优化及限流计费功能。 |
| 核心功能 | 统一OpenAI标准接口转换、正规API Key多渠道负载均衡、故障自动重试切换、语义缓存降本、按调用量精细化看板。 |
| 目标用户 | 中小型开发团队、独立商业开发者、AI创业公司。 |
| 难度/周期 | 中等 · 1-2个月 · 成本:服务器与数据库成本(约$20-$50/月)、域名及SSL证书、正规渠道API测试资金。 |
| 收费模式 | SaaS订阅制(按月席位费或按调用量分层收费)、私有化部署支持服务费。 |
| 竞争风险 | 竞品极多(如OneAPI、NewAPI、LiteLLM等已高度成熟),市场获客难度大。 |
| 依据 | 已验证事实 |
多模态桌面/移动端聚合客户端(支持本地+BYOK+聚合源)
| 产品构想 | 利用其多模型和媒体生成适配逻辑,打造体验优异的跨平台原生Chat客户端,支持用户自带Key(BYOK)或按需购买Tokens。 |
| 核心功能 | 本地多模态会话管理、支持GPT/DeepSeek/Gemini等一键切换、图像/音频生成持久化、自定义Prompt工作流、云端同步。 |
| 目标用户 | 需要日常使用多款大模型办公、创作的内容创作者与开发者。 |
| 难度/周期 | 较高 · 2-3个月 · 成本:跨平台前端开发成本、多端同步存储服务器(约$30/月)。 |
| 收费模式 | 客户端买断制License、云端同步高级功能订阅费、增值官方渠道Token包。 |
| 竞争风险 | GPL-3.0开源协议限制商用代码闭源;逆向接口随时失效导致差评。 |
| 依据 | 数据支持的判断 |
大模型接口稳定性监控与逆向防御测试平台
| 产品构想 | 反向利用其逆向工程与Provider适配逻辑,为大模型提供商或API聚合平台提供防抓取、防爬虫对抗测试及第三方可用性拨测报告。 |
| 核心功能 | 各大模型公网逆向漏洞态势监控、模拟绕过测试套件、接口可用性多地域拨测报警面板。 |
| 目标用户 | AI提供商、模型聚合分发平台技术团队、安全合规审计团队。 |
| 难度/周期 | 高 · 3-4个月 · 成本:大量拨测节点服务器成本、代理IP池费用(约$100-$300/月)。 |
| 收费模式 | 企业级安全监控订阅费、定制化渗透与对抗防御咨询服务。 |
| 竞争风险 | 目标B端客户群体小且决策链路长,技术对抗更新频率极高。 |
| 依据 | AI推测 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| fighting41love/funNLP | 中文介绍暂未生成 中英文敏感词、语言检测、中外手机/电话归属地/运营商查询、名字推断性别、手机号抽取、身份证抽取、邮箱抽取、中日文人名库、 |
84,505 | Python |
| asgeirtj/system_prompts_leaks | 中文介绍暂未生成 Leaked system prompts of ChatGPT, Claude, Gemini and more. T |
71,144 | Python |
| FlowiseAI/Flowise | 中文介绍暂未生成 Build AI Agents, Visually |
55,566 | TypeScript |
| HKUDS/nanobot | 中文介绍暂未生成 Your lightweight open-source personal agent. |
49,995 | Python |
| AstrBotDevs/AstrBot | 中文介绍暂未生成 AI Agent Assistant & development framework that integrates l |
46,621 | Python |
| chatboxai/chatbox | 中文介绍暂未生成 Powerful AI Client |
42,294 | TypeScript |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 ,最近推送 ,发布过 100 个 Release |
| 社区活跃 | Star 67,033 / Fork 0 / Issue 0(数据支持,可自行核实) |
| 许可证 | 未检测到(需人工确认) |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/xtekky/gpt4free.git cd gpt4free # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。