
Loading...

Loading...
Run encrypted inference from your own app with lightnode-sdk. Non-custodial. Your wallet signs on-chain, the SDK does the rest. About 0.022 LCAI per call on mainnet, free on testnet, ECDH-P256 + AES-256-GCM end to end.
Pick one. Browser wallet, cloud IDE, or your laptop.
The live playground: connect a wallet, type a prompt, watch the decrypted answer stream. Free on testnet.
Open the playgroundRunnable starter pre-installed. Fund the printed testnet address with one faucet click, hit Run, see one real inference complete.
Clone marinom2/lightnode-examples, cd quickstart-inference, npm i, npm start.
One package, one peer dep. Pure-JS crypto (noble), runs in Node 18+, browsers, StackBlitz, Bun, Cloudflare Workers.
npm install lightnode-sdk viemOne encrypted inference end to end. Real code, runs as-is.
// 5 lines, key in, answer out. Works in Node, Next.js, anywhere.
import { runInferenceWithKey } from "lightnode-sdk";
const { answer, txs } = await runInferenceWithKey({
network: "testnet", // or "mainnet"
privateKey: process.env.PRIVATE_KEY as `0x${string}`,
prompt: "Reply with a one-sentence fun fact about the ocean.",
});
console.log(answer); // decrypted answer
console.log(txs.createSession, txs.submitJob); // on-chain receiptsBrand-new project? Use the create scaffolder. Existing project? Use add. Both detect Next.js, Hono, and Node.
npm create lightnode-app my-appScaffold a brand-new LightChain AI dApp. Three templates: node, nextjs-api, hono.
The rest of /build is split into four focused sub-pages. Pick one.
Six interactive cards. Bridge live quotes, real DAO proposals, multi-turn chat, worker preflight, dispute lookup, models. Plus the three API tiers and server-vs-user-pays patterns.
Try each module inline ->Run lightnode commands from the browser via the interactive runner. Plus the full catalog and how to actually invoke npx without the package-name conflict.
Run a CLI command ->Real mainnet workers + models + per-model performance, refreshed every minute. Plus the five-stage encrypted-inference protocol and live-verified mainnet+testnet receipts.
See live network data ->All 14 read-only LightNode methods. Testnet vs mainnet. Every official contract address. Recent SDK versions. Non-custodial model. Python port. Framework examples.
Browse the reference ->