Skip to main content
Version: 0.8.0

SDK overview

@lazrus/nukle is the official TypeScript SDK for the Nuklē API. It ships two focused clients:

ClientUse it forSafe in the browser?
createNukleClientContent and media readsYes
createNukleFormClientSending data to one public formYes

Create and manage form schemas in Studio. A website API key only reads that website's enabled content and media. Browser requests are accepted only from the domain configured for the website in Studio; server requests can read without an Origin header.

All API failures throw NukleApiError. The error includes an HTTP status, a stable code, and optional details returned by Core.

import { NukleApiError } from '@lazrus/nukle';

try {
// Call an SDK method here.
} catch (error) {
if (error instanceof NukleApiError) {
console.error(error.status, error.code, error.message);
}
}

The SDK accepts a custom fetch implementation when your runtime needs one.