Open Source 开源项目 2h ago Updated 1h ago 更新于 1小时前 53

[GitHub] tashfeenahmed/freellmapi 【GitHub】tashfeenahmed/freellmapi

FreeLLMAPI aggregates free tiers from 34 LLM providers into a single OpenAI-compatible API endpoint, offering approximately 7.4 billion tokens per month across 474 model families and 635 free endpoints The router automatically selects the best available model per request, falls back to alternative providers on rate limits, and tracks per-key usage to stay within free-tier caps Model catalog updates are pulled from a signed feed at freellmapi.co without requiring manual git pulls; free users rece 聚合34家AI厂商的免费额度,提供单一OpenAI兼容API,月均推理容量达74亿tokens。 内置智能路由与自动降级机制,按密钥加密存储并追踪用量,确保不触发各厂商限流。 支持一键配置主流编程助手(Claude Code、Cursor、Aider等),兼容Chat、Embedding、图像、视频、音频等多模态接口。 提供Fusion多模型并行合成模式,通过裁判模型整合多个免费模型的输出以提升质量。 路由器自动从官方签名源拉取模型目录更新,免费版月同步,付费版实时同步。

62
Hot 热度
58
Quality 质量
55
Impact 影响力

Analysis 深度分析

TL;DR

  • FreeLLMAPI aggregates free tiers from 34 LLM providers into a single OpenAI-compatible API endpoint, offering approximately 7.4 billion tokens per month across 474 model families and 635 free endpoints
  • The router automatically selects the best available model per request, falls back to alternative providers on rate limits, and tracks per-key usage to stay within free-tier caps
  • Model catalog updates are pulled from a signed feed at freellmapi.co without requiring manual git pulls; free users receive monthly snapshots while premium ($19/yr) users get same-day updates
  • Native integration with major AI coding agents (Claude Code, Codex CLI, Aider, Cursor, Zed, JetBrains AI, Gemini CLI, and others) via one-command setup scripts
  • Supports multimodal APIs including chat, embeddings, image generation, video generation, audio speech, and audio transcriptions, plus a Fusion feature for multi-model parallel synthesis

Why It Matters

FreeLLMAPI addresses a critical pain point for AI practitioners: the fragmentation of free-tier LLM access across dozens of providers with incompatible SDKs, rate limits, and failure modes. By collapsing this into a single OpenAI-compatible endpoint with automatic routing and fallback, it enables developers to build applications that are both cost-free and resilient to provider-level disruptions. This approach could accelerate experimentation and prototyping, especially for indie developers and small teams with limited budgets.

Technical Details

  • Router Architecture: A local server acts as a smart proxy that maintains an encrypted key store for each provider, tracks per-key token usage against individual free-tier caps, and implements automatic failover when any provider rate-limits or becomes unavailable
  • Catalog System: The router self-updates from a signed feed at freellmapi.co, pulling new model listings, quota changes, and compatibility fixes; free tier receives monthly snapshots while premium subscribers get same-day catalog updates
  • API Compatibility: Exposes full OpenAI-style surfaces (/v1/chat/completions, /v1/responses, /v1/completions, /v1/images/generations, /v1/videos/generations, /v1/audio/speech, /v1/audio/transcriptions, /v1/embeddings, /v1/models) plus Anthropic Messages API (/v1/messages), native Gemini wire (/v1beta), and opt-in Ollama emulation (NDJSON format)
  • Fusion Feature: A virtual "fusion" model fans prompts out to a panel of diverse free models in parallel, then uses a judge model to synthesize a single consolidated answer from the drafts
  • CLI Integration: One-command setup scripts (e.g., npx freellmapi setup-claude, setup-codex, setup-aider) that fetch live catalogs, back up existing configs, and avoid overwriting user configurations; zero-persistence launchers inject credentials only into child processes

Industry Insight

  • The proliferation of free-tier LLM offerings from major labs (Google, Groq, Cerebras, Mistral, Cohere, NVIDIA, HuggingFace, etc.) signals a shift toward freemium distribution strategies; tools like FreeLLMAPI will likely become essential infrastructure for cost-conscious development pipelines
  • The one-command integration with coding agents suggests a growing ecosystem of "middleware" tools that abstract away provider complexity—expect similar aggregation layers for embeddings, vision, and audio as the market matures
  • The signed-catalog auto-update mechanism represents a novel approach to maintaining accuracy in a rapidly changing landscape; this pattern could be adopted by other aggregation tools to reduce maintenance burden and improve reliability

TL;DR

  • 聚合34家AI厂商的免费额度,提供单一OpenAI兼容API,月均推理容量达74亿tokens。
  • 内置智能路由与自动降级机制,按密钥加密存储并追踪用量,确保不触发各厂商限流。
  • 支持一键配置主流编程助手(Claude Code、Cursor、Aider等),兼容Chat、Embedding、图像、视频、音频等多模态接口。
  • 提供Fusion多模型并行合成模式,通过裁判模型整合多个免费模型的输出以提升质量。
  • 路由器自动从官方签名源拉取模型目录更新,免费版月同步,付费版实时同步。

为什么值得看

该项目解决了开发者手动对接数十个免费LLM额度时面临的SDK碎片化、限流管理和配置繁琐等痛点,为AI应用原型开发、低成本推理及编程代理提供了可扩展的免费算力聚合方案,对降低AI开发门槛具有直接实用价值。

技术解析

  • 统一API网关与智能路由架构:项目部署为本地服务器,将34家厂商的免费API密钥加密存储后,通过单一OpenAI兼容端点对外暴露。路由器根据模型能力、当前限流状态和配额自动选择最优端点,并在某厂商触发限流时无缝降级至备用提供商。
  • 多协议兼容与客户端集成:完整支持OpenAI标准接口(/v1/chat/completions/v1/responses/v1/embeddings等),并通过协议转换层兼容Anthropic Messages API与Gemini原生接口(/v1beta),同时提供Ollama模拟服务以对接Zed、JetBrains等本地模型客户端。
  • 自动化目录管理与密钥追踪:路由器定期从freellmapi.co拉取签名模型目录,自动同步新模型、配额变更与兼容性修复。系统按密钥维度追踪token消耗,确保各厂商免费额度不被超额使用。
  • Fusion多模型并行合成:引入虚拟fusion模型,将同一提示词并行分发至多个异构免费模型,再由专用裁判模型对多份草稿进行综合评估与融合,生成最终答案,提升复杂任务的输出质量。
  • 一键式开发工具链配置:提供npx freellmapi setup-<tool>命令,自动备份并注入配置,支持Claude Code、Codex CLI、Aider、Cursor等十余款主流编程代理,同时支持MCP服务器与零持久化启动器以保障密钥安全。

行业启示

  • 免费算力聚合将成为AI开发基础设施的新形态:随着各大厂商竞相开放免费额度,碎片化资源的管理成本正在上升,类似“免费额度路由器”的中间件有望成为个人开发者与初创团队的标准配置。
  • 多模型协同与降级容错是提升可用性的关键路径:单一免费模型存在明显的限流与能力瓶颈,通过智能路由、并行合成与自动降级构建高可用推理层,是低成本实现生产级稳定性的有效策略。
  • 开发者体验(DX)向“零配置”与“协议透明”演进:项目通过一键脚本与多协议兼容层屏蔽了底层厂商差异,未来AI工具链的竞争将更多聚焦于对现有生态的无缝接入能力,而非重复造轮子。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Open Source 开源 LLM 大模型 Deployment 部署 Code Generation 代码生成