API reference · Public
Get stats
GET/v1/stats
Public counters for the live record, including the measured time from a word being spoken to the feed sending it.
On this page
Auth. None. Without a token the call is served as Free (the Free delay and request budget, shared per IP); send Authorization: Bearer lb_… for your plan's.
Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).
Request
curl "https://api.langbot.ai/v1/stats"from langbot import LangbotClient
async with LangbotClient() as lb:
stats = await lb.stats()
print(stats["spoken_to_emitted_ms"])import { LangbotClient } from "@langbotai/sdk";
const lb = new LangbotClient();
const stats = await lb.stats();
console.log(stats.spoken_to_emitted_ms);Response
200 OK
{
"ts": 1793685901548,
"sources_this_week": 61,
"events_today": 73818,
"phrases_today": 1491,
"p50_lag_ms": null,
"spoken_to_emitted_ms": {"p50": 72, "p90": 113, "n": 7118, "window": "24h"},
"events_live": 0,
"markets_open": 33368,
"clients_connected": 0
}A real response from the API; long lists are cut to their first items.
spoken_to_emitted_ms is measured over real sources in the last 24 hours (n samples); demo and test traffic is left out of every figure.
Errors
| Status | code | When |
|---|---|---|
| 401 | token_invalid | A token was sent and not recognised. Send a valid one, or none to call anonymously. |
| 429 | rate_limited | Over your request budget; wait Retry-After seconds. |
Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.