Metadata-Version: 2.5
Name: loop-ai-data
Version: 2026.12.1
Summary: Official LLM API prices and AI subscription plans as data, with a few lookup and cost helpers.
Project-URL: Homepage, https://loop.firmiana.si/
Project-URL: Source, https://github.com/LynShen-Team/loop
Project-URL: Issues, https://github.com/LynShen-Team/loop/issues
License-Expression: MIT AND CC-BY-4.0
License-File: LICENSE
Keywords: anthropic,cost,deepseek,gemini,llm,openai,pricing,tokens
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# loop-ai-data

This package was called `ai-almanac-data` until December 2026. The old name stays on the registry but gets no new versions.

Official LLM API prices and AI subscription plans, as JSON with a few helpers. The data is the same as on
[loop.firmiana.si](https://loop.firmiana.si/): every price links to the provider's own page and has the date it was
last checked.

A new version comes out when the data changes, at most once a day. The version is the date: `2026.12.2`.

```sh
pip install loop-ai-data
```

```python
import loop_ai_data as aa

aa.price("claude-opus-5-5")
# {'tier': 'standard', 'currency': 'USD', 'input': 4, 'output': 20, 'cache_read': 0.2, 'source': 'https://…', …}

aa.cost("deepseek-v4-pro", input=3_000_000, output=500_000, currency="USD")
# {'input': …, 'output': …, 'cache_read': 0.0, 'cache_write': 0.0, 'total': …, 'currency': 'USD'}

aa.cheapest(capability="vision", limit=5)
aa.plans(product="chatgpt")
```

| Function | Returns |
|---|---|
| `models(provider=, capability=, all=False)` | current models (`all=True` adds legacy and deprecated) |
| `model(name)` | one model by `provider/id`, id or alias |
| `price(name, tier=, region=, currency=)` | a price row, per 1M tokens; `currency` converts to USD, CNY or EUR |
| `cost(name, input=, output=, cache_read=, cache_write=, …)` | cost of that many tokens |
| `cheapest(by=, currency=, provider=, capability=, limit=)` | cheapest current models, blended 3:1 input:output by default |
| `plans(vendor=, product=, audience=)`, `plan(key)` | subscription plans |
| `convert(amount, src, dst)` | currency conversion at the ECB rate in `meta["fx"]` |
| `meta` | version, data date, exchange rates |

Prices are stored in the currency each provider publishes (Chinese providers in CNY). Converted amounts use the ECB
reference rate of the date in `meta["fx"]` and are for comparison only.

Python 3.9+. No dependencies. Code MIT, data CC BY 4.0. Please credit "Loop" with a link when you publish
numbers from it.
