freellmapi README

The project's README from github.com/tashfeenahmed/freellmapi. As one markdown file: README.md.

FreeLLMAPI

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. One OpenAI-compatible endpoint.

Aggregate free tiers from dozens of providers, plus custom OpenAI-compatible chat, embedding, image, and audio endpoints, behind a single /v1 API. Keys are stored encrypted. A router picks the best available model for each request, falls over to the next provider when one is rate-limited, and tracks per-key usage so you stay under every free-tier cap.

CI GitHub stars License: MIT PRs Welcome Docker image Ask DeepWiki

freellmapi.co · browse the full catalog: 474 model families, 635 free endpoints

English · 简体中文 · Русский

Download for macOS Download for Windows Self-host with Docker Get it on Google Play Download on the App Store

FreeLLMAPI dashboard — Models page with the monthly token budget

Your router updates its own model catalog from a signed feed: new free models, quota changes, and compatibility fixes land without a git pull. Free installs get the monthly snapshot, so a model reaches them 30 days after it joins the live feed; premium routers get it the same day. Go live at freellmapi.co ($19/yr, cancel anytime).


Contents

Guides: Install & deploy · API reference · Clients & coding agents · Prompt compression · Architecture & internals · Documentation index · Contributor guide

Why this exists

Every serious AI lab now offers a free tier, a few million tokens a month, a few thousand requests a day. On its own each tier is a toy. Stacked together, they add up to roughly 7.4 billion tokens per month of working inference capacity, across 474 model families / 635 provider endpoints from small-and-fast to reasonably capable.

The problem is that stacking them by hand is painful: thirty-four different SDKs, thirty-four different rate limits, thirty-four places a request can fail. FreeLLMAPI collapses that into one OpenAI-compatible endpoint. Point any OpenAI client library at your local server, and it routes transparently across whichever providers you've added keys for.

And the free-tier landscape shifts weekly: providers launch models, retire them, and change quotas without notice. FreeLLMAPI tracks all of that for you. The router pulls a signed model catalog from freellmapi.co on its own, so your install keeps up without a git pull. See Premium (live catalog) for how fast it keeps up.

The free tier, stacked — ~7.4B tokens of free inference per month across 34 providers

Supported providers

Google
Google
Groq
Groq
Cerebras
Cerebras
OpenCode Zen
OpenCode Zen
Mistral
Mistral
OpenRouter
OpenRouter
Cloudflare
Cloudflare
Cohere
Cohere
Z.ai (Zhipu)
Z.ai (Zhipu)
NVIDIA
NVIDIA
HuggingFace
HuggingFace
ModelScope
Qwen3 · DeepSeek V4 · GLM-5 (needs Aliyun cn binding)

… and 22 more free providers

Plus a custom provider — point chat, embedding, image, or audio models at any OpenAI-compatible endpoint (llama.cpp, LM Studio, vLLM, a local Ollama, or a remote gateway) from the Keys page.

The full, always-current list lives at freellmapi.co/models with per-model rate limits, context windows, and free-token budgets.

Compatible CLIs & coding agents

Claude Code
Claude Code
Codex CLI
Codex CLI
Gemini CLI
Gemini CLI
Cursor
Cursor
Cline
Cline
Roo Code
Roo Code
OpenCode
OpenCode
Aider
Aider

… plus Continue, Goose, Qwen Code, Kilo Code, Crush, Zed, JetBrains AI, DeepSeek Harness, MiMo Code, AtomCode, OpenClaw, Hermes Agent, Pi, Reasonix and any OpenAI-compatible, Anthropic, Gemini or Ollama client

Most agents configure themselves with one command that reads your live catalog, backs up the existing config and merges into it:

npx freellmapi setup-claude --url http://localhost:3001 --api-key <unified-key>

All supported agents and their setup commands → · Per-tool recipes, MCP server and URL tokens →

How it compares

Feature comparison against OpenRouter, LiteLLM, and Portkey

Based on public documentation, July 2026 — corrections welcome.

Features

Feature overview

The scope is deliberately narrow — see what's not supported yet.

Quick start

One-liner (Docker required — sets up ~/freellmapi, generates an encryption key, pulls the image, and starts the container):

curl -fsSL https://freellmapi.co/install.sh | bash

Prefer to read before you pipe to bash? The script is here. Re-running it is safe: your .env (and encryption key) is preserved and the container updates to :latest.

Open http://localhost:3001, add your provider keys on the Keys page, reorder the Fallback Chain to taste, and grab your unified API key from the Keys page header. That unified key is what you point your OpenAI SDK at.

On Windows, the easiest path is the desktop .exe installer from Releases (below). On Android, see the experimental Termux guide.

Everything else — Docker Compose, local development, declarative startup config, production builds, LAN access, and backups — is in docs/en/install/01-install.md.

Desktop app

A native menu-bar app lives in desktop/: the entire router + dashboard running locally from your tray, with a glass popover showing live request stats.

FreeLLMAPI desktop app

Download from Releases — the macOS .dmg and the Windows .exe installer are attached to every release. No account or password to set up: the only credential you need is the unified API key from the tray popover. Build-from-source steps and where your data lives: docs/en/install/01-install.md#desktop-app.

For macOS 12 Monterey or later, choose arm64 (Apple Silicon) or x64 (Intel). Both Mac builds also include a ZIP download.

Works with OpenAI-compatible clients

Anything that can target an OpenAI-compatible base URL works: set it to http://localhost:3001/v1 with the unified key from the dashboard. Every generator supports --dry-run; npx freellmapi launch (Claude Code) and launch-codex (Codex) keep credentials out of config files entirely. The router also doubles as an MCP server your agents can introspect mid-session.

ChatGPT connects to the same local router through a private Secure MCP Tunnel. The ask_freellmapi MCP tool routes a ChatGPT-requested task through /v1/chat/completions and returns the answer with served-model, fallback, cache, execution, and token metadata. Base URL and bearer authentication live in the tunnel-client configuration; the default model is set with MCP_INFERENCE_DEFAULT_MODEL (auto when unset). No key belongs in Git or in the MCP URL. ChatGPT setup →

Provider keys can be managed from the terminal too, with a dashboard session token (FREELLMAPI_DASHBOARD_TOKEN or --token): npx freellmapi keys add|list|remove|test <platform>, where keys test re-checks stored keys. See cli/README.md.

FreeLLMAPI is local-first and single-user by design. Your provider keys stay in your SQLite database, encrypted at rest, and requests go from your machine to the upstream providers you enabled.

Languages

The dashboard ships in 60 languages (the desktop tray menu in 6). The UI auto-detects your browser/system language on first load and you can switch any time from ⋯ → Settings; the choice is remembered. Right-to-left languages (العربية, עברית, فارسی, اردو) flip the whole layout automatically, and only the active language's dictionary is loaded — the rest never touch your bandwidth.

United States China Spain France Brazil Italy India Saudi Arabia Bangladesh Russia Pakistan Indonesia Germany Japan Kenya Türkiye Vietnam South Korea Iran Thailand Poland Ukraine Myanmar Romania Netherlands Malaysia Philippines Nigeria Ethiopia Uzbekistan Azerbaijan Sri Lanka Nepal Cambodia Greece Czechia Hungary Sweden Israel Denmark Finland Norway Slovakia Bulgaria Croatia Serbia Lithuania Taiwan Portugal Georgia

The full list of locales lives in client/src/i18n/locale-config.ts.

The original six locales are human-reviewed; the newer ones are machine- translated and improve as native speakers send corrections — a one-string PR is a great first contribution.

Translations live in client/src/i18n/locales/ as flat JSON files. To fix a string, edit the value in the locale's JSON file. To add a language, copy en.json, translate the values, and register the locale in client/src/i18n/locale-config.ts (and desktop/src/i18n.ts for the tray strings); npm test checks every locale for key/placeholder parity — PRs welcome.

Premium (live catalog)

The router keeps its model catalog fresh on its own: it pulls a signed catalog from freellmapi.co twice a day and applies new models, quota changes, and provider quirk fixes to your local DB. Your own enable/disable choices and custom providers are never touched, and every download is verified against a pinned Ed25519 key before it is applied.

The catalog currently tracks 34 providers, 474 model families, 635 free provider/model endpoints (584 chat, 41 embeddings, 7 transcription, 3 video), and roughly 7.4 billion tokens per month of listed free-tier capacity. Browse the full set at freellmapi.co/models.

Free installs pull the same signed catalog, but from the monthly snapshot: a model joins it 30 days after it lands in the live feed, so the free build currently sits about 303 models behind. Nothing expires and nothing is crippled — it just arrives later.

Premium keeps that signed catalog live on every router you run. When a provider launches a strong free model, quietly tightens a quota, or breaks a wire format, live-feed routers receive the update the same day we ship it.

Go live at freellmapi.co →

The catalog server never sees your prompts, completions, or provider keys — the router stays fully self-hosted either way.

Using the API

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:3001/v1",
    api_key="freellmapi-your-unified-key",
)

resp = client.chat.completions.create(
    model="auto",  # let the router pick; or "auto:fast", "auto:smart", a profile, or a model id
    messages=[{"role": "user", "content": "Summarise the fall of Rome in one sentence."}],
)
print(resp.choices[0].message.content)
print("Routed via:", resp.headers.get("x-routed-via"))

Streaming, the auto:* routing strategies, tool calling, vision input, Gemini Google Search grounding, embeddings, and the Anthropic Messages surface — with curl and Python examples for each — are all in docs/en/api/01-rest-api.md. Every response carries an X-Routed-Via: <platform>/<model> header so you can see which provider actually served it.

Screenshots

Models

Pick a routing strategy and watch the monthly token budget fill across the whole provider fleet. Every model shows live reliability, speed, and intelligence scores — the order below is how requests route right now.

Models page

Keys

Manage provider credentials and grab the unified API key your apps connect with. Each key shows a status dot and when it was last health-checked.

Keys page

Playground

Send a chat completion through the router and see which provider served it, with the model ID and latency printed right on the message. Attach files by button, drag-and-drop, or paste: images (PNG/JPEG/WebP/GIF) are downscaled in the browser and sent as image content parts to a vision-capable model, and text files (TXT/MD/CSV/JSON/LOG) are inlined into the prompt as fenced blocks.

Playground page

Analytics

Request volume, success rate, tokens in and out, average latency, and per-provider breakdowns over 24h / 7d / 30d / 90d windows.

Analytics page

How it works

One request in, the best free model out — the fallback chain with live scores, cooldowns, and quota tracking

One request in, the best free model out: the router picks the highest-priority model with a healthy key that's under all its rate limits, decrypts the key in memory, and calls the provider — on a 429/5xx it cools that key down and retries the next model in your chain. The component walkthrough, routing internals, and operational details live in docs/en/architecture/00-high-level-index.md.

FAQ

Do I need a password? Not for the desktop app — the dashboard signs itself in with a hidden local account, so there is nothing to set up and nothing to forget. Open it from the tray icon → Open Dashboard, or in any browser on the same computer (for example http://127.0.0.1:31415); both sign in on their own. Another device reaching the app over LAN access still sees the sign-in form. Server installs (Docker, one-liner, npm run dev) do have an email + password account.

I forgot the password on a server install. Click Forgot password? on the login page. There is no email to send a link to, so the one-time code is printed to the server log — read it with docker compose logs -f freellmapi (or in the terminal running the server, or in the desktop log file), then enter it on the reset form. The code lasts 15 minutes.

Where are the logs? In the container log for Docker, in the terminal for a source run, and in <data dir>/logs/freeapi.log for the desktop app — reachable from the tray menu's Open Logs Folder.

How do I uninstall? Remove the app (Trash on macOS, Settings → Apps on Windows, docker compose down -v for Docker), then delete the data directory: %APPDATA%\FreeLLMAPI\, ~/Library/Application Support/FreeLLMAPI/, or ~/.config/FreeLLMAPI/. Uninstalling never touches that folder on its own.

Longer answers, per install method: docs/en/install/01-install.md#faq-passwords-logs-uninstall.

Limitations

Stacking free tiers has real trade-offs: no frontier models, variable latency, no SLA — and the effective intelligence of the endpoint dips late in the day as top models hit their daily caps, then resets at UTC midnight. Read the honest list in docs/en/architecture/00-high-level-index.md#limitations before building anything real on this.

Contributing

Contributors very welcome! See CONTRIBUTING.md for the dev loop, PR expectations, and the policy on AI/LLM-assisted contributions (short version: welcome, same quality bar as any other PR). Good first PRs:

npm install && npm run dev gets you the server on :3001 and the dashboard on :5173, both with HMR. For a repeatable setup, use ./scripts/dev-bootstrap.sh on Bash or .\scripts\dev-bootstrap.ps1 on PowerShell; each preserves an existing .env. PRs should include a test, keep the existing suite green (npm test), and match the .editorconfig / tsconfig defaults already in the repo. Database migration workflow and the full contributor loop are in CONTRIBUTING.md.

Contributors

@moaaz12-web @lukasulc @VinhPhamAI @deadc @zhangyu1324 @kentpan @stephenzwj @chongjiazhen @vjsai @long2ice @sadesguy @hodlmybeer69-bit @phoenixikkifullstack @jtbrennan-git @praveenkumarpranjal @nordbyte @mybropro @danscMax @jhash @JammyJames1234 @coffcoe @Sumit4codes @meliani @thedavidweng @bharvey42 @yuvrxj-afk @Tushar49 @nicyoong @Aldo-f @Tazrif-Raim @m1nuzz @suantea @OhOkThisIsFine @LoneRifle @ita333 @barbotkonv @Naster17 @StealthTensor @EmranAhmed @itsfuad @RobinHoodO @hmm183 @duemilionidieuro-bot @cagedbird043 @jasnoorgill @Joey9024 @AskingConical @ProAlit @hjhhoni @immanuelsavio @Slyker @wells1013 @evgkrsk @aaronjmars @Robs87 @dashitongzhi @QingJ01 @3215 @saifulaiub123 @PietFourie @mhmdkrmabd @DemeulemeesterxMaxime @HoodBlah @SeanPedersen @andersmmg @chirag127 @allababbot @johan-droid @redenfire @itzpingcat @kairwang01 @gongjurenzhangwei @jsonring @1029734570 @86TheCactus @AmiroKD @ecryptomillionaire-dev @4riful @fix2015 @iisyw @xsfhacg @noobix @nandukmelath @NirvanaCh7 @Mohamed3nan @Arman-Espiar @MetaMysteries8 @lujun880726 @qq97693453 @emv33 @ousamabenyounes @yfdyh000 @s-uryansh @arsalanyavari @RoboMWM @gaurang-py @ddy4633 @UrbsKali @hb-0 @xyblue135 @Icesenator @ZER0-auto @tashdroid @Patrickleondev @hiiamwaffledev @w0fv1 @oppih @n3dhir @ksp2000 @quabynahdavis @qinghuanandejiangshi @qatcod @CooperSheroy @shahidbeig-a11y @Kaban15 @efcunha @sukaimi @rome-xi @bsi-bcp @rodion-gudz @bjornmage @kenanlabs @xzyj50609 @Ahmedtahoon2 @Inference1 @yzhkali @levonk @tripstar6000 @alkank @Yi-111-a @The88788 @ac1982 @agammann @Claven07

Disclaimer

This project is for personal experimentation and learning, not production. Free tiers exist so developers can prototype against them; they aren't a stable, supported inference substrate and shouldn't be treated as one. If you build something real on top of FreeLLMAPI, swap in a paid API before you ship. Your relationship with each upstream provider is governed by the terms you accepted when you created your account — those terms still apply when the traffic is proxied through this project, and you're responsible for complying with them.

How each provider's ToS views a personal, single-user proxy — reviewed provider by provider in May 2026 — is in docs/en/architecture/00-high-level-index.md#terms-of-service-review.

License

MIT

freellmapi (tashfeenahmed/freellmapi)

Searching Database…

这是什么?FreeLLMAPI 把 34 个大模型服务商的免费额度汇集在一起(共 635 个免费模型接口,涵盖 474 个模型系列),通过一个兼容 OpenAI 的 /v1 接口对外提供服务,并具备智能路由、自动故障转移和加密密钥存储功能。
这是要导入的库,还是需要单独运行的服务器?这是一个你自己部署和运行的自托管代理服务器(可通过 Docker 或桌面应用运行)。你的应用只需把 OpenAI SDK 指向它的统一接口即可,无需导入任何代码。
怎样才能把它跑起来?运行一行命令的 Docker 安装脚本,它会创建 ~/freellmapi、生成加密密钥、拉取镜像并启动容器;然后在“Keys”页面添加你的服务商密钥,并获取你的统一 API 密钥。
使用它一定要装 Docker 吗?Docker 是推荐的快速上手方式;Windows 用户可以不装 Docker,改用桌面版 .exe 安装包。如果要从源码构建,则需要 Node 20 及以上版本。
免费版有什么限制?项目自我描述为刻意保持较窄的功能范围。免费(非高级版)安装只能获取每月更新一次的模型目录快照:新模型最长要 30 天才能同步到你这里;而每年 19 美元的高级版则当天即可同步。
能在树莓派这样的小设备上运行吗?可以。它支持 Windows、macOS、Linux 服务器,也能运行在树莓派这类小型 ARM 开发板上,空闲时约占用 40MB 常驻内存。
什么是 Fusion?Fusion 是一个虚拟模型:它会把同一个提示词并行发送给一组多样化的免费模型,然后由一个评判模型把这些草稿综合成一个合并后的答案。
除了 Docker 容器,还有桌面应用吗?有。它提供原生的 macOS(.dmg)和 Windows(.exe)菜单栏应用,可在本地从系统托盘运行完整的路由和控制面板;点击托盘图标会弹出窗口,显示实时请求统计,无需注册账号。
除了文本,它还能生成图片、视频或语音吗?可以。它提供 /v1/images/generations、/v1/videos/generations 和 /v1/audio/speech 接口,会把请求路由到提供这些媒体模型的各个服务商;同时还能把同步和排队两种视频任务统一处理,最终输出成品 MP4。
开箱即用,可以接入哪些编码智能体?Claude Code、Codex CLI、Gemini CLI、Aider、Cline、Roo Code、Continue、OpenCode、Goose、Qwen Code、Kilo Code、Crush、Cursor、Zed、JetBrains AI、DeepSeek Harness 和 AtomCode 都有对应的一条命令配置生成器,例如 'npx freellmapi setup-claude'。
Size
20.5 MB
Stars
37.4K
Age
5mo
Commits · 90 Days