The Lumina API is a thin REST surface over the on-chain protocol. The spec served atDocumentation Index
Fetch the complete documentation index at: https://docs.lumina-org.com/llms.txt
Use this file to discover all available pages before exploring further.
/openapi.json
is the canonical contract — this section is a human-friendly tour.
Base URL
http://localhost:3000 by default (override the port
via PORT env in the lumina-api repo).
Authentication
| Surface | Auth |
|---|---|
/health, /products, /policies/:p/:i, /sandbox/*, /openapi.json, /api-docs | None |
/api/v1/agent/onboard | None — the request body itself is signed by the wallet |
/api/v1/policies, /bonds, /marketplace/listings, /agent/keys, /webhooks, … | x-api-key: lk_… |
/api/v1/keys/generate (legacy admin issuer) | x-admin-token: <secret> |
Live OpenAPI / Swagger UI
- Machine-readable:
GET /openapi.json - Browser explorer:
GET /api-docs
Idempotency
POST /api/v1/policies honours an optional Idempotency-Key header (UUIDv4
recommended). Replays return the cached response without double-spending.
Numeric encoding
Every on-chain integer (USDC base units, LUMINA wei, prices) is returned as a decimal string to avoid JavaScript Number precision loss. Convert withBigInt(str).
Error envelope
LuminaError with .status, .code, .message.
Postman collection
A complete collection is available in the lumina-api repo:docs/lumina-api.postman_collection.json.
Import into Postman → set baseUrl and apiKey collection variables → done.
Endpoint examples
The next sub-pages walk through GET / CREATE / DELETE / WEBHOOK examples auto-generated by Mintlify from theopenapi.json snapshot.