Admin SDK
The TypeScript client operators' tools use to call the Management API.
npm install @nylorun/adminimport { createAdmin } from "@nylorun/admin";
const admin = createAdmin();
const status = await admin.tenant.status();
const { key } = await admin.keys.put("backend"); // an application key, shown once@nylorun/admin calls the Management API with a management key. Operators'
tools use it: CI jobs, scripts, and internal consoles. Your app server does
not; it calls the Runtime API through @nylorun/agents.
It requires Node 24 or later.
Each endpoint page in this section shows the SDK call first, then cURL. A request
body's requestId is optional; the client generates one.
The client
| Group | Endpoints |
|---|---|
admin.tenant | Tenant |
admin.keys | Application keys |
admin.models | Models |
admin.vaults | Vaults |
admin.signingKeys | Signing keys |
admin.settings | Settings |
In a browser
A management key never leaves your server: the Runtime refuses any key sent
with an Origin header. A browser UI calls your own server, which adds the
key. createManagementClient() from @nylorun/admin/client is the same
client without Node modules, for that browser side:
import { createManagementClient } from "@nylorun/admin/client";
const admin = createManagementClient({ url: "/api/nylorun-admin" });Studio helpers
| Function | Returns |
|---|---|
mintStudioLoginToken({ studioUrl, adminKey, subject? }) | A single-use Studio login token, for an app that embeds Studio |
deriveStudioToken(adminKey) | Studio's key, derived from the admin key |
Both take the admin key, which only the Tenant's machine holds. See Studio in Guides.