llmlatency
Measured latency and uptime for AI inference APIs, as a small Python client for the open dataset published at llmlatency.dev.
Probes run every five minutes from four regions and are never routed through a gateway or an aggregator, so the numbers describe the providers themselves rather than a proxy in front of them.
- Network probe — DNS → TCP → TLS → time to first byte.
- Inference probe — time to first token on a real completion request.
These are different quantities, an order of magnitude apart, and this library never mixes them in one ranking.
Install
pip install llmlatency
No dependencies — standard library only.
Use it from Python
import llmlatency
llmlatency.regions()
# ['ap-tokyo', 'eu-hetzner', 'sa-east', 'us-central']
llmlatency.fastest("eu-hetzner")
# {'rank': 1, 'provider': 'nscale', 'p50_ms': 99, 'p95_ms': 203,
# 'uptime_pct': 100, 'samples': 289}
for row in llmlatency.ranking("us-central")[:3]:
print(row["rank"], row["provider"], row["p50_ms"], "ms")
llmlatency.provider("anthropic") # one provider across every region
llmlatency.generated_at() # snapshot timestamp, ISO-8601 UTC
Fetch once and pass the snapshot around if you make several queries:
data = llmlatency.fetch()
fast = {r: llmlatency.fastest(r, data=data) for r in llmlatency.regions(data)}
Use it from the shell
llmlatency fastest # fastest provider in every region
llmlatency ranking --region eu-hetzner --top 5
llmlatency provider openai
llmlatency fastest --probe inference --json
Data, methodology, licence
- Live rankings and full methodology: https://llmlatency.dev
- Machine-readable snapshot: https://llmlatency.dev/api/rankings.json
- Citable archive with a DOI: https://doi.org/10.5281/zenodo.21954788
- Daily snapshots in git: https://github.com/mazamaka/llm-latency-tracker
The dataset is CC-BY-4.0; this client library is MIT.
Limitations, stated up front. Vantage points are cloud data centres, not consumer networks, so absolute values are lower than an end user would see — the comparison between providers is the meaningful part. Provider coverage changes over time as APIs appear and shut down.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llmlatency-0.1.0.tar.gz.
File metadata
- Download URL: llmlatency-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
908d3ba9752b7fc68e5e17932e235c2342b92233cb7c4ff09389046033625ee2
|
|
| MD5 |
255c1b8f73c3664ab71fcd1836ba4778
|
|
| BLAKE2b-256 |
15419620df986517a9f7c76f8cfb04ffeccd9cfd29d8b3c230dc592e28495ce1
|
File details
Details for the file llmlatency-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llmlatency-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44fbd4c69a32431d1e4084425f4d5a2bc313ddc1501df015d9a469c2801461cc
|
|
| MD5 |
f7cd56b99b961622dc78ae2d7199df7d
|
|
| BLAKE2b-256 |
a149a5715046ddbb1f0b3e8c26b2c234a8212b51db371777f51d1c1d0a153543
|