Platform API
Health, identity, and admin-only organization and node management.
GET/api/health
Control-plane and node health. No auth required.
curl https://lorivo.dev/api/health
{"status": "ok","db": true,"vllm": true,"nodes": { "up": 1, "total": 1 }}
status is ok when the database and at least one node are healthy, degraded otherwise.
GET/api/me
Identifies the caller's scope. The CLI uses this during lorivo login.
curl https://lorivo.dev/api/me \-H "Authorization: Bearer ad_…"
{ "scope": "org", "org": { "id": "…", "name": "acme-ai" } }
{ "scope": "admin" }
Organizations (admin)
GET/api/orgs
List organizations with their API keys and adapter counts.
POST/api/orgs
Create an organization.
curl https://lorivo.dev/api/orgs \-H "Authorization: Bearer <admin-key>" \-H "Content-Type: application/json" \-d '{"name":"acme-ai"}'
DELETE/api/orgs/:id
Delete an organization and everything it owns. Fails with 409 while the org still has users.
Nodes (admin)
GET/api/nodes
List GPU nodes with status and telemetry (control tokens are never serialized).
POST/api/nodes
Register a node. Returns the node record plus one-time token (the agent uses it for heartbeats) and controlTokenHash (the agent's AGENT_CONTROL_TOKEN_HASH env value).
curl https://lorivo.dev/api/nodes \-H "Authorization: Bearer <admin-key>" \-H "Content-Type: application/json" \-d '{"name": "gpu-1","baseUrl": "http://10.0.0.5:4000","modelName": "qwen3-4b","modelSource": "Qwen/Qwen3-4B-AWQ"}'
{"node": { "id": "…", "name": "gpu-1", "baseUrl": "http://10.0.0.5:4000" },"token": "node_…","controlTokenHash": "sha256:…"}
Optional engine settings (maxLoras, maxCpuLoras, maxLoraRank, maxModelLen, maxNumSeqs, gpuMemoryUtil, kvCacheDtype) are accepted at registration with the node-agent defaults.
POST/api/nodes/:id/heartbeat
Node-agent heartbeat: reports health, draining state, loaded LoRAs, VRAM, and the served model. Authenticated with the node token or an admin credential.