llmf
Free, keyless LLM access in one call — with automatic multi-provider fallback.
llmf (llmfree) is a stdlib-only Python library and CLI for public, no-API-key OpenAI-compatible endpoints. It picks a live target, falls back on failure, and runs on desktop and Termux.
import llmf
r = llmf.chat("Explain the CAP theorem in two sentences.")
print(r) # Reply is a str subclass
print(r.source) # "provider/model"
print(r.provider, r.model, round(r.latency, 3), r.usage)
Install
pip install -U llmf
pip install -U "llmf[stealth]" # optional: curl_cffi TLS fingerprint
python -c "import llmf; print(llmf.__version__)"
llmf version
llmf -v version # + active transport
pip show llmf
Name: llmf
Version: 0.6.2
Summary: free, keyless LLM chat with automatic multi-provider fallback — stdlib only
Home-page: https://github.com/MoonLite-Br/llmfree
Author: Html
License: MIT
Requires-Python: >=3.8
Requires: (none)
| Field | Value |
|---|---|
| Name | llmf |
| Version | 0.6.2 |
| Dependencies | none (optional: stealth → curl_cffi>=0.7) |
| License | MIT |
| Repository | https://github.com/MoonLite-Br/llmfree |
| PyPI | https://pypi.org/project/llmf/ |
Python API
Short form → Reply
import llmf
r = llmf.chat("Hello!")
r.text, r.source, r.provider, r.model, r.latency, r.usage, r.attempts
llmf.chat("hi", model="best") # fast | best | code | vision | reasoning
llmf.chat("hi", model=["best", "fast"])
llmf.chat("hi", provider="ch-at")
llmf.chat("hi", provider="nottrack") # opt-in (auto=False)
llmf.chat("Describe this", images=["photo.jpg"], model="vision")
for piece in llmf.stream("Count 1 to 5"):
print(piece, end="", flush=True)
OpenAI-shaped form
from llmf import LLMF
llm = LLMF()
c = llm.chat.completions.create(
model="best",
messages=[{"role": "user", "content": "Hello"}],
)
print(c.choices[0].message.content)
print(c.model, c.provider, c.usage, c.latency)
Catalog, survival, concurrency, transport
for m in llmf.models.list():
print(m.name, m.tags, m.alive, m.samples, m.streaming)
llmf.models.list(live=True)
llmf.models.resolve("fast")
llmf.models.check() # doctor → survival history
llmf.configure(
timeout=30,
vision_timeout=90,
routing="adaptive",
race=2,
max_inflight=6, # per-provider parallel cap before spill
transport="auto", # urllib | auto | curl_cffi
impersonate="chrome",
)
llmf.register("lab", "http://localhost:11434/v1", ["llama3"], front=True)
Env: LLMF_TIMEOUT, LLMF_PROXY, LLMF_MODEL, LLMF_ROUTING, LLMF_TRANSPORT, LLMF_IMPERSONATE
What’s new (0.6.x)
0.6.2
- Packaging release of the load-aware stack with full README / correct project URLs / static badges.
0.6.1 (runtime)
- Load-aware routing (threads,
race,llmf serve): per-provider concurrency caps (Client(max_inflight=6); e.g. ch-at 8, llm7 3, pollinations 1). Extra work spills to the next provider instead of queueing behind a busy one. llmf serve --max-concurrent N(default 48): returns429 {"code":"busy"}+Retry-After: 1under load; listen backlog 128.- Friendlier errors for
llmf serve --host 8000(port-in-host-slot) and “port in use”.
0.6.0
- Vetted catalogue (≥2 live runs, ≥75% success).
- Survival history (
history.json,alive/flaky/dead,ModelInfo.alive/.samples). - Optional
llmf[stealth]/transport/impersonate. ModelInfo.streaming/no-streaminllmf models.
See CHANGELOG.md.
Built-in providers
| Provider | Auto | Concurrency note | Notes |
|---|---|---|---|
ch-at |
yes | cap 8 | Early / best |
rewind-ai |
yes | Vetted instruct models | |
ovh |
yes | Default gpt-oss-120b |
|
kilo-openrouter |
yes | Free OpenRouter-style ids | |
freeai |
yes | qwen7b, … |
|
chatjimmy |
yes | Fast; may be non-streaming | |
kilo-gateway |
yes | ||
pollinations |
yes | cap 1 | openai |
llm7 |
yes | cap 3 | |
blockrun |
yes | ||
chatai |
yes | Strict daily quota | |
nottrack |
no | Opt-in: provider="nottrack" |
CLI
llmf "question" | llmf ask "…"
llmf chat
llmf models [list|check|resolve NAME]
llmf doctor [--all] [--include-non-chat] [--include-limited] [--no-save]
llmf providers | health | version
llmf serve [--host] [--port] [--max-concurrent N] [--api-key] [--cors]
Flags: -m/--model, -p/--provider, -s/--system, --image, --stream, --json, -v,
--routing ranked|adaptive, --race N, --timeout, --proxy,
--transport urllib|auto|curl_cffi, --impersonate,
--live, --all, --include-limited, --include-non-chat, --no-save,
serve: --host, --port, --max-concurrent, --api-key, --cors, --strict-models, --no-fallback.
$ llmf -v "2+2=?"
$ llmf models
$ llmf doctor
$ llmf serve --port 8000 --max-concurrent 48
$ llmf --transport auto -v version
Behaviour
- Fallback + cooldowns; survival scores demote flaky models.
- Load-aware: at concurrency limit, spill to next provider (no long queue on one busy endpoint).
- Live catalog/doctor: chat+free by default.
transport="auto"usescurl_cffiwhenllmf[stealth]is installed.- Total failure →
llmf.AllProvidersFailed.
Safety
Unofficial free endpoints may change. Do not send secrets. Opt-in providers and discover() are explicit. llmf serve defaults to localhost.
Development
git clone https://github.com/MoonLite-Br/llmfree.git
cd llmfree
python -m unittest discover -s tests -v
python -m build && twine check dist/*
License
MIT © 2026 Html / MoonLite-Br
Metadata
Release files for llmf 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llmf-0.6.2.tar.gz | 66.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llmf-0.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 125.6 kB
Release files / llmf-0.6.2.tar.gz
| Download URL | llmf-0.6.2.tar.gz |
|---|---|
| Size | 66.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5057498b2c878a933750615b88158494360975dd6352a24a556f12e268923e5
|
|
BLAKE2b-256 checksum How to use checksums |
e010907ae2ce0288364263c099350aa4b2a464c160f15711d0a2e151329c65ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / llmf-0.6.2-py3-none-any.whl
| Download URL | llmf-0.6.2-py3-none-any.whl |
|---|---|
| Size | 59.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f42858db1100a667fa60b5e7e9a6bb59cbbf32bd7af8ea7706751011d47ff840
|
|
BLAKE2b-256 checksum How to use checksums |
7472f8a4ec398e03779b7e9d2e153d110b943954b8773923fcff0b7debf16b02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for llmf 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.