Web / REST Reference
Integrate iLive from any backend or browser via the REST API.
Web / REST Reference
iLive ships no web SDK binary today. Server and browser integrations call the REST API directly using any HTTP client. The full endpoint catalog — request bodies, response schemas, and a try-it panel — lives at /docs/api, auto-generated from our OpenAPI specification.
This page shows the handful of request patterns most callers need. Use it as a starting template and refer to /docs/api/* for exhaustive schemas.
No official JavaScript, TypeScript, or Python client library ships today. Use your language's native HTTP client (fetch, requests, axios, etc.). We will ship typed clients generated from the same OpenAPI spec in a future release.
Base URL
| Environment | URL |
|---|---|
| Production | https://api.iliveauth.com |
| Local development | http://localhost:8000 (direct) or https://api.localhost (via Caddy) |
All endpoints are versioned under /v1/ or /v2/ — see /docs/api for the current version of each route.
Authentication
Every request requires an Authorization: Bearer <token> header. Tokens are either long-lived API keys or short-lived JWTs minted for a specific session. See API keys for details.
Recommended patterns
The four patterns below cover most integrations: creating a managed liveness session, verifying its result, comparing two faces, and detecting faces in an uploaded image.
1. Create a managed liveness session
2. Verify the session result
3. Compare two faces
4. Detect faces in an image
For every other endpoint — webhooks, batch face search, session replay, admin APIs — see /docs/api.
Handling rate limits
Every API response carries rate-limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset). On 429 Too Many Requests, back off using exponential delay with jitter. Details and per-endpoint limits are documented at /docs/reference/rate-limits.
Error handling
Errors use a consistent envelope:
The full code catalog lives at /docs/reference/error-codes. A one-liner for decoding:
Always log the request_id — it lets support trace the request end-to-end.
Webhooks
For asynchronous flows (session completed, face-matched, compliance alert), subscribe via webhooks instead of polling. Payloads are signed so you can verify authenticity. See Webhooks for the event catalog and signature verification recipe.