llms-free 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llms_free-1.0.0/PKG-INFO +53 -0
- llms_free-1.0.0/README.md +33 -0
- llms_free-1.0.0/llms_free/__init__.py +71 -0
- llms_free-1.0.0/llms_free/cli.py +112 -0
- llms_free-1.0.0/llms_free.egg-info/PKG-INFO +53 -0
- llms_free-1.0.0/llms_free.egg-info/SOURCES.txt +9 -0
- llms_free-1.0.0/llms_free.egg-info/dependency_links.txt +1 -0
- llms_free-1.0.0/llms_free.egg-info/entry_points.txt +2 -0
- llms_free-1.0.0/llms_free.egg-info/top_level.txt +1 -0
- llms_free-1.0.0/pyproject.toml +33 -0
- llms_free-1.0.0/setup.cfg +4 -0
llms_free-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: llms-free
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Zero-dependency Python client and CLI for daily-verified Free LLM APIs, live uptime probes, and local open-weight model VRAM specs from llms.free.
|
|
5
|
+
Author: llms.free
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://llms.free
|
|
8
|
+
Project-URL: Documentation, https://llms.free/data
|
|
9
|
+
Project-URL: Repository, https://github.com/mrlupien-ai/free-llm-apis
|
|
10
|
+
Project-URL: Issues, https://github.com/mrlupien-ai/free-llm-apis/issues
|
|
11
|
+
Keywords: llm,free-llm,free-llm-api,openai,ollama,vram,groq,openrouter,ai
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# `llms-free` (Python SDK & CLI)
|
|
22
|
+
|
|
23
|
+
Zero-dependency Python client and CLI for **[llms.free](https://llms.free)** — daily-verified **Free LLM APIs** (no credit card), live 30-minute uptime probes, and local open-weight model VRAM specs.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install llms-free
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## CLI Usage
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
llms-free # Verified free LLM APIs (no credit card)
|
|
35
|
+
llms-free providers --no-phone # No card & no phone verification
|
|
36
|
+
llms-free models --vram 8 # Open-weight models that fit an 8 GB GPU
|
|
37
|
+
llms-free status # Live 30-minute uptime & latency probes
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Python SDK
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from llms_free import get_providers, get_models, get_status
|
|
44
|
+
|
|
45
|
+
free_apis = get_providers(status="verified", no_phone=True)
|
|
46
|
+
local_8gb = get_models(max_vram=8, capability="coding")
|
|
47
|
+
live = get_status()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Links
|
|
51
|
+
- **Directory & Free Playground:** [https://llms.free](https://llms.free)
|
|
52
|
+
- **Public REST API & CSV Exports:** [https://llms.free/data](https://llms.free/data)
|
|
53
|
+
- **GitHub Repository:** [https://github.com/mrlupien-ai/free-llm-apis](https://github.com/mrlupien-ai/free-llm-apis)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `llms-free` (Python SDK & CLI)
|
|
2
|
+
|
|
3
|
+
Zero-dependency Python client and CLI for **[llms.free](https://llms.free)** — daily-verified **Free LLM APIs** (no credit card), live 30-minute uptime probes, and local open-weight model VRAM specs.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install llms-free
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## CLI Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
llms-free # Verified free LLM APIs (no credit card)
|
|
15
|
+
llms-free providers --no-phone # No card & no phone verification
|
|
16
|
+
llms-free models --vram 8 # Open-weight models that fit an 8 GB GPU
|
|
17
|
+
llms-free status # Live 30-minute uptime & latency probes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Python SDK
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from llms_free import get_providers, get_models, get_status
|
|
24
|
+
|
|
25
|
+
free_apis = get_providers(status="verified", no_phone=True)
|
|
26
|
+
local_8gb = get_models(max_vram=8, capability="coding")
|
|
27
|
+
live = get_status()
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Links
|
|
31
|
+
- **Directory & Free Playground:** [https://llms.free](https://llms.free)
|
|
32
|
+
- **Public REST API & CSV Exports:** [https://llms.free/data](https://llms.free/data)
|
|
33
|
+
- **GitHub Repository:** [https://github.com/mrlupien-ai/free-llm-apis](https://github.com/mrlupien-ai/free-llm-apis)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Zero-dependency Python client for the public llms.free REST API (https://llms.free/data)."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
from typing import Any
|
|
6
|
+
from urllib.parse import urlencode
|
|
7
|
+
from urllib.request import Request, urlopen
|
|
8
|
+
|
|
9
|
+
DEFAULT_BASE = "https://llms.free"
|
|
10
|
+
__version__ = "1.0.0"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _request_json(path: str, params: dict[str, Any] | None = None, base: str = DEFAULT_BASE) -> dict[str, Any]:
|
|
14
|
+
clean = {k: str(v) for k, v in (params or {}).items() if v is not None and v != ""}
|
|
15
|
+
qs = f"?{urlencode(clean)}" if clean else ""
|
|
16
|
+
url = f"{base.rstrip('/')}{path}{qs}"
|
|
17
|
+
req = Request(
|
|
18
|
+
url,
|
|
19
|
+
headers={
|
|
20
|
+
"Accept": "application/json",
|
|
21
|
+
"User-Agent": f"llms-free-pypi/{__version__} (+https://llms.free)",
|
|
22
|
+
},
|
|
23
|
+
)
|
|
24
|
+
with urlopen(req, timeout=12) as resp:
|
|
25
|
+
return json.loads(resp.read().decode("utf-8"))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def get_providers(
|
|
29
|
+
*,
|
|
30
|
+
status: str | None = None,
|
|
31
|
+
no_card: bool | None = None,
|
|
32
|
+
no_phone: bool | None = None,
|
|
33
|
+
openai: bool | None = None,
|
|
34
|
+
q: str | None = None,
|
|
35
|
+
base: str = DEFAULT_BASE,
|
|
36
|
+
) -> dict[str, Any]:
|
|
37
|
+
return _request_json(
|
|
38
|
+
"/api/v1/providers",
|
|
39
|
+
{
|
|
40
|
+
"status": status,
|
|
41
|
+
"noCard": None if no_card is None else str(no_card).lower(),
|
|
42
|
+
"noPhone": None if no_phone is None else str(no_phone).lower(),
|
|
43
|
+
"openai": None if openai is None else str(openai).lower(),
|
|
44
|
+
"q": q,
|
|
45
|
+
},
|
|
46
|
+
base=base,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def get_models(
|
|
51
|
+
*,
|
|
52
|
+
max_vram: float | None = None,
|
|
53
|
+
license: str | None = None,
|
|
54
|
+
capability: str | None = None,
|
|
55
|
+
q: str | None = None,
|
|
56
|
+
base: str = DEFAULT_BASE,
|
|
57
|
+
) -> dict[str, Any]:
|
|
58
|
+
return _request_json(
|
|
59
|
+
"/api/v1/models",
|
|
60
|
+
{
|
|
61
|
+
"maxVram": max_vram,
|
|
62
|
+
"license": license,
|
|
63
|
+
"capability": capability,
|
|
64
|
+
"q": q,
|
|
65
|
+
},
|
|
66
|
+
base=base,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def get_status(*, base: str = DEFAULT_BASE) -> dict[str, Any]:
|
|
71
|
+
return _request_json("/api/v1/status", base=base)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""CLI entrypoint for llms-free (https://llms.free)."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import json
|
|
6
|
+
import sys
|
|
7
|
+
from typing import Sequence
|
|
8
|
+
|
|
9
|
+
from . import __version__, get_models, get_providers, get_status
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _print_table(headers: Sequence[str], rows: Sequence[Sequence[str]]) -> None:
|
|
13
|
+
widths = [
|
|
14
|
+
max(len(h), *(len(str(r[i])) for r in rows)) if rows else len(h)
|
|
15
|
+
for i, h in enumerate(headers)
|
|
16
|
+
]
|
|
17
|
+
fmt = lambda cols: " ".join(str(c).ljust(widths[i]) for i, c in enumerate(cols))
|
|
18
|
+
print(fmt(headers))
|
|
19
|
+
print(" ".join("-" * w for w in widths))
|
|
20
|
+
for r in rows:
|
|
21
|
+
print(fmt(r))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main(argv: Sequence[str] | None = None) -> int:
|
|
25
|
+
parser = argparse.ArgumentParser(
|
|
26
|
+
prog="llms-free",
|
|
27
|
+
description="Daily-verified Free LLM APIs, live uptime probes, and local open-weight models (https://llms.free).",
|
|
28
|
+
)
|
|
29
|
+
parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {__version__}")
|
|
30
|
+
sub = parser.add_subparsers(dest="command")
|
|
31
|
+
|
|
32
|
+
p_prov = sub.add_parser("providers", help="List verified free LLM APIs")
|
|
33
|
+
p_prov.add_argument("--all", action="store_true", help="Include trial, paid-only, and retired tiers")
|
|
34
|
+
p_prov.add_argument("--no-phone", action="store_true", help="Only providers without phone verification")
|
|
35
|
+
p_prov.add_argument("--q", help="Search query")
|
|
36
|
+
p_prov.add_argument("--json", action="store_true", help="Output raw JSON")
|
|
37
|
+
|
|
38
|
+
p_mod = sub.add_parser("models", help="List open-weight local models")
|
|
39
|
+
p_mod.add_argument("--vram", type=float, help="Max Q4 VRAM in GB (8K context)")
|
|
40
|
+
p_mod.add_argument("--capability", help="Filter by capability (coding, vision, tools)")
|
|
41
|
+
p_mod.add_argument("--license", help="Filter by license (e.g. apache, mit)")
|
|
42
|
+
p_mod.add_argument("--json", action="store_true", help="Output raw JSON")
|
|
43
|
+
|
|
44
|
+
p_stat = sub.add_parser("status", help="Live 30-minute uptime & latency status")
|
|
45
|
+
p_stat.add_argument("--json", action="store_true", help="Output raw JSON")
|
|
46
|
+
|
|
47
|
+
args = parser.parse_args(argv)
|
|
48
|
+
cmd = args.command or "providers"
|
|
49
|
+
|
|
50
|
+
if cmd == "providers":
|
|
51
|
+
data = get_providers(
|
|
52
|
+
status=None if getattr(args, "all", False) else "verified",
|
|
53
|
+
no_phone=True if getattr(args, "no_phone", False) else None,
|
|
54
|
+
q=getattr(args, "q", None),
|
|
55
|
+
)
|
|
56
|
+
if getattr(args, "json", False):
|
|
57
|
+
print(json.dumps(data, indent=2))
|
|
58
|
+
return 0
|
|
59
|
+
rows = [
|
|
60
|
+
[
|
|
61
|
+
p["name"],
|
|
62
|
+
(p.get("limits") or {}).get("unitNote") or p.get("quotaNote") or "See docs",
|
|
63
|
+
"Phone" if p.get("noPhoneRequired") is False else "No phone",
|
|
64
|
+
p.get("baseUrl") or "-",
|
|
65
|
+
p.get("consoleUrl") or p.get("docsUrl") or "-",
|
|
66
|
+
]
|
|
67
|
+
for p in data.get("providers", [])
|
|
68
|
+
]
|
|
69
|
+
print(f"\nllms.free — {len(rows)} Free LLM APIs (verified live)\n")
|
|
70
|
+
_print_table(["PROVIDER", "FREE LIMIT", "PHONE", "BASE URL", "GET KEY / DOCS"], rows)
|
|
71
|
+
print("\nInteractive filters & playground: https://llms.free\n")
|
|
72
|
+
return 0
|
|
73
|
+
|
|
74
|
+
if cmd == "models":
|
|
75
|
+
data = get_models(max_vram=args.vram, capability=args.capability, license=args.license)
|
|
76
|
+
if args.json:
|
|
77
|
+
print(json.dumps(data, indent=2))
|
|
78
|
+
return 0
|
|
79
|
+
rows = [
|
|
80
|
+
[m["name"], f"{m['paramsB']}B", f"{m['q4Vram8kGb']} GB", m["license"], m["ollamaCommand"]]
|
|
81
|
+
for m in data.get("models", [])
|
|
82
|
+
]
|
|
83
|
+
print(f"\nllms.free — {len(rows)} Open-Weight Local Models\n")
|
|
84
|
+
_print_table(["MODEL", "SIZE", "Q4 VRAM (8K)", "LICENSE", "OLLAMA COMMAND"], rows)
|
|
85
|
+
print("\nExact VRAM math: https://llms.free/tools/llm-vram-calculator\n")
|
|
86
|
+
return 0
|
|
87
|
+
|
|
88
|
+
if cmd == "status":
|
|
89
|
+
data = get_status()
|
|
90
|
+
if args.json:
|
|
91
|
+
print(json.dumps(data, indent=2))
|
|
92
|
+
return 0
|
|
93
|
+
rows = [
|
|
94
|
+
[
|
|
95
|
+
p["name"],
|
|
96
|
+
p["status"].upper(),
|
|
97
|
+
f"{p['medianLatency24hMs']} ms" if p.get("medianLatency24hMs") else "-",
|
|
98
|
+
f"{p['uptimeRecentPct']}%" if p.get("uptimeRecentPct") is not None else "-",
|
|
99
|
+
p["docsUrl"],
|
|
100
|
+
]
|
|
101
|
+
for p in data.get("providers", [])
|
|
102
|
+
]
|
|
103
|
+
print(f"\nllms.free — Live 30-Minute API Status ({data['operationalCount']}/{data['count']} operational)\n")
|
|
104
|
+
_print_table(["PROVIDER", "STATUS", "24H MEDIAN", "UPTIME", "DOCS"], rows)
|
|
105
|
+
print("\nFull 90-day timeline: https://llms.free/status\n")
|
|
106
|
+
return 0
|
|
107
|
+
|
|
108
|
+
return 1
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if __name__ == "__main__":
|
|
112
|
+
sys.exit(main())
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: llms-free
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Zero-dependency Python client and CLI for daily-verified Free LLM APIs, live uptime probes, and local open-weight model VRAM specs from llms.free.
|
|
5
|
+
Author: llms.free
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://llms.free
|
|
8
|
+
Project-URL: Documentation, https://llms.free/data
|
|
9
|
+
Project-URL: Repository, https://github.com/mrlupien-ai/free-llm-apis
|
|
10
|
+
Project-URL: Issues, https://github.com/mrlupien-ai/free-llm-apis/issues
|
|
11
|
+
Keywords: llm,free-llm,free-llm-api,openai,ollama,vram,groq,openrouter,ai
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# `llms-free` (Python SDK & CLI)
|
|
22
|
+
|
|
23
|
+
Zero-dependency Python client and CLI for **[llms.free](https://llms.free)** — daily-verified **Free LLM APIs** (no credit card), live 30-minute uptime probes, and local open-weight model VRAM specs.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install llms-free
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## CLI Usage
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
llms-free # Verified free LLM APIs (no credit card)
|
|
35
|
+
llms-free providers --no-phone # No card & no phone verification
|
|
36
|
+
llms-free models --vram 8 # Open-weight models that fit an 8 GB GPU
|
|
37
|
+
llms-free status # Live 30-minute uptime & latency probes
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Python SDK
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from llms_free import get_providers, get_models, get_status
|
|
44
|
+
|
|
45
|
+
free_apis = get_providers(status="verified", no_phone=True)
|
|
46
|
+
local_8gb = get_models(max_vram=8, capability="coding")
|
|
47
|
+
live = get_status()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Links
|
|
51
|
+
- **Directory & Free Playground:** [https://llms.free](https://llms.free)
|
|
52
|
+
- **Public REST API & CSV Exports:** [https://llms.free/data](https://llms.free/data)
|
|
53
|
+
- **GitHub Repository:** [https://github.com/mrlupien-ai/free-llm-apis](https://github.com/mrlupien-ai/free-llm-apis)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
llms_free
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "llms-free"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Zero-dependency Python client and CLI for daily-verified Free LLM APIs, live uptime probes, and local open-weight model VRAM specs from llms.free."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [{ name = "llms.free" }]
|
|
13
|
+
keywords = ["llm", "free-llm", "free-llm-api", "openai", "ollama", "vram", "groq", "openrouter", "ai"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 5 - Production/Stable",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Homepage = "https://llms.free"
|
|
25
|
+
Documentation = "https://llms.free/data"
|
|
26
|
+
Repository = "https://github.com/mrlupien-ai/free-llm-apis"
|
|
27
|
+
Issues = "https://github.com/mrlupien-ai/free-llm-apis/issues"
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
llms-free = "llms_free.cli:main"
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.packages.find]
|
|
33
|
+
include = ["llms_free*"]
|