--- id: g4f version: "8.1.6" license: unclear license_treatment: unclear maintenance: active --- # g4f — The official gpt4free repository | various collection of powerful language models License: unclear · Maintenance: active · Downloads: 138.2K/mo ## What it is and what it does GPT4Free (g4f) is a community-driven aggregator that wraps multiple LLM and media-generation providers into a single Python client library, REST API, and web GUI. It abstracts away provider-specific authentication and API differences, presenting a unified OpenAI-compatible interface for text generation, image creation, and local inference. The package ships with five runtime dependencies (requests, aiohttp, brotli, pycryptodome, nest-asyncio2) and supports both synchronous and asynchronous usage patterns. The project provides multiple deployment options: a pure Python pip install, Docker containers (full and slim variants for x86_64 and arm64), a Windows .exe launcher, and an MCP (Model Context Protocol) server for integration with AI assistants. It includes a web GUI, FastAPI-based Interference API, CLI tools, and a JavaScript browser client. While actively maintained and popular (66551 GitHub stars, 138223 monthly downloads), it carries Pre-Alpha status and an unclear license, so production use should be preceded by legal review and provider compliance verification. Use it for: - Build a chatbot or text-generation application that can switch between multiple LLM providers without code changes. - Generate images programmatically by routing requests to multiple image-generation services through a single interface. - Run a local web GUI or REST API server that aggregates free or accessible LLM access for team use. - Integrate web search, scraping, and image generation into Claude or other AI assistants via the MCP server. - Prototype or test AI features without committing to a single commercial provider's API and pricing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Aggregates multiple LLM and media-generation providers into a unified Python client and REST API, offering multi-provider access to language models, image generation, and local inference backends. Yes, with conditions. Install if you need multi-provider LLM or media-generation access and can accept Pre-Alpha stability and an unclear license. The low install friction, active maintenance, and large community are strong signals. However, verify the license terms before production use, understand that underlying providers may change or restrict access, and test provider stability for your use case. Not suitable for mission-critical applications without additional due diligence. ## Install pip install g4f uv add g4f poetry add g4f ## Installing g4f Before you install: Low install friction with a pure-Python wheel and five runtime dependencies. Actively maintained with a release one day old and 66551 GitHub stars, though classified as Pre-Alpha development status. License in practice: License treatment is unclear—no SPDX identifier or raw license text is recorded. Verify the actual license terms at the project repository before use, particularly if integrating into proprietary or commercial work. Quickstart: pip install -U g4f[all] from g4f.client import Client client = Client() response = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello"}] ) print(response.choices[0].message.content) Python 3.10+ required. Some providers require Chrome/Chromium for browser automation; check provider-specific documentation. Verify before relying: - Stability and uptime guarantees for aggregated third-party providers are not documented in the fact sheet. - Terms of service compliance for accessing underlying providers through g4f is not specified. - Performance characteristics (latency, rate limits) across different providers are not quantified. - Data retention and privacy handling for requests routed through the aggregator are not detailed. ## Package facts - License: not declared (unclear) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 138.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags multi-provider llm client, openai-compatible api wrapper, free language model access, image generation aggregator, gpt4free python sdk, llm-aggregator, openai-compatible, multi-provider [View on SkillFed](https://skillfed.io/packages/g4f) · [View on PyPI](https://pypi.org/project/g4f/)