Appearance
Latency API Overview
The Latency API lives under a single versioned host:
https://ws.latency.app/v1/Some endpoints are public; others require authentication. Either way, calls are rate-limited, see below.
Rate limits
Every caller is metered so no single one can starve the rest. Over a limit you receive 429 Too Many Requests with a body of { "error": "rate_limited" } and a Retry-After header (seconds). Back off and retry.
| Caller | Governed by | Default |
|---|---|---|
| Anonymous (public endpoints) | A strict shared budget, per client IP | ~1,200 requests/min; heavier endpoints (e.g. function execution) are tighter |
| Authenticated (API key) | Your plan quotas, not the shared public budget | Scales with your plan |
| DNS-over-HTTPS | Its own generous per-IP budget | 600 req/min, free and unmetered, never counted against quotas |
Authenticate for real workloads
The public budgets are sized for interactive and light programmatic use. If you are calling the API from a service or at volume, get an API key: account calls run against your plan quotas and are not throttled by the anonymous budget. The DNS resolver is the deliberate exception, it is on the house. Full breakdown on platform primitives → rate limits.
Errors
Failures return a non-2xx status and a JSON body of the shape { "error": "<code>" }, sometimes with a detail field. Never put secrets in a URL, send your API key in the Authorization header.