AI Monetization Runtime ~10 minutes
Protect AI execution in production
with the AI Monetization Runtime.
Integrate Licenzy as an AI Monetization Runtime. Authorize before compute, meter usage, and synchronize commercial state from TEST to LIVE.
01Before you start
A short checklist, all in test mode.
Complete the checklist in the portal, then run the integration safely in test mode.
02Integration
Six steps from setup to live.
Verify, configure, checkout, authorize, meter, then switch from TEST to LIVE with a mode-specific API key.
- 01
Verify & create a test key
READY · ~2 MINterminal# Complete account verification in the Licenzy portal first. export LICENZY_API_KEY="lz_test_xxx" # Keep the key server-side. Its mode comes from the key. - 02
Configure the tenant Runtime
CONFIGURED · ~2 MINportal# For this Project and TEST mode: # 1. Connect your tenant Stripe account. # 2. Configure the Stripe inbound webhook. # 3. Create a product_code for checkout. - 03
Create checkout on your server
CHECKOUT · ~2 MINapp.tsconst response = await fetch("https://api.licenzy.app/v1/checkout/session", { method: "POST", headers: { Authorization: `Bearer ${process.env.LICENZY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": checkoutRequestId, }, body: JSON.stringify({ subject_ref: "customer_123", product_code: "workflow.summarize", }), }); const { checkout_url } = await response.json(); // Redirect the customer to checkout_url. // Reuse checkoutRequestId when retrying this same checkout. - 04
Verify access after the webhook
PROTECTED · ~2 MINapp.ts// Stripe -> Licenzy verified webhook -> entitlement update const response = await fetch("https://api.licenzy.app/v1/access/check", { method: "POST", headers: { Authorization: `Bearer ${process.env.LICENZY_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ subject_ref: "customer_123" }), }); const { allowed } = await response.json(); if (!allowed) return deny(); - 05
Compute, then consume usage
METERED · ~2 MINapp.tsconst result = await runModel(input); await fetch("https://api.licenzy.app/v1/usage/consume", { method: "POST", headers: { Authorization: `Bearer ${process.env.LICENZY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": usageRequestId, }, body: JSON.stringify({ subject_ref: "customer_123", units: 1 }), }); // Reuse usageRequestId when retrying this same usage event. - 06
Go live
LIVE · ~1 MINterminalexport LICENZY_API_KEY="lz_live_xxx" # A LIVE key selects LIVE mode; request bodies stay the same.
03After integration
Every execution becomes observable.
Once integrated, Licenzy tracks authorization, usage, synchronization, and operational evidence. Runtime Intelligence interprets that evidence in the Portal without changing Runtime or commercial state.
AuthorizedMeteredObservableAudited
runtime · intelligence
Operational- access.checkgranted / denied decisionsobserved
- usage.consumeretry-safe usage recordingmetered
- entitlement.syncStripe and runtime statesynced
- runtime.healthoperational evidenceobserved
health · observability · operational evidence
✓Runtime connected✓Compute protected✓Usage metered✓Runtime observable✓Commercial state synchronized
04What's next
Continue into the documentation.
Continue with the references for your integration.
Ready when compute isCommercially correct AI execution
Commercially correct AI execution
starts before the model runs.
Put a runtime between payment and compute. Authorize with confidence, meter safely, and keep every execution aligned with commercial state.