Skip to content

Overview

Keylight is a thin, public HTTP API. The SDKs (Swift, Rust, JavaScript) wrap it, but you can call it directly from any platform that speaks HTTP.

  • Base URL: https://api.keylight.dev
  • Scoping: every SDK endpoint is /{tenantId}/{productId}/{action}; the public keyset is /{tenantId}/.well-known/keylight-keys.
  • Auth: send your X-Keylight-SDK-Key header on every SDK endpoint (see SDK key). The keyset endpoint is public — no auth.
  • Format: requests and responses are JSON.
  • Lease: successful activate/validate responses include a signed Ed25519 v3 lease your app verifies offline (see Offline leases).

Every SDK endpoint (activate, validate, deactivate, free-tier, keyless) takes the same headers and path parameters:

HeaderRequiredValue
Content-Typeyesapplication/json
X-Keylight-SDK-Keyyes (once the tenant has set one)Your SDK key
Path parameterDescription
tenantIdYour tenant id
productIdThe product id

The keyset endpoint is public — no X-Keylight-SDK-Key and no productId.

Every activate/validate success includes a lease, Ed25519-signed by Keylight and verified offline by your app.

FieldTypeMeaning
kidstringKey id in the tenant’s keyset
licenseKeyHashhex stringSHA-256 of the normalized license key
instanceIdUUIDThe activation this lease is bound to
issuedAtunix secondsWhen Keylight signed
expiresAtunix secondsissuedAt + 7 days
statusstring"active", "fallback", or "expired"
entitlementsstring[]Sorted feature strings granted (may be empty)
signaturebase64Ed25519 over v3|kid|keyHash|instanceId|issuedAt|expiresAt|status|entitlements_csv

entitlements_csv is the entitlements array sorted and comma-joined (empty string when none), so client and server reconstruct an identical signed payload. Verification rules and the 7-day TTL: Ed25519 leases.

  • Monthly API calls — hard quota per plan; 429 + Retry-After once exceeded. Counters reset each calendar month.
  • Instance cap — hard per-plan cap on concurrent active instances; /activate returns 402 when exceeded.
  • License count — soft 100k ceiling per account; enforced at mint, not activation.

Plan quotas: Billing & plans.