NylorunDocsBeta
Management API

Admin SDK

The TypeScript client operators' tools use to call the Management API.

npm install @nylorun/admin
import { 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

GroupEndpoints
admin.tenantTenant
admin.keysApplication keys
admin.modelsModels
admin.vaultsVaults
admin.signingKeysSigning keys
admin.settingsSettings

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

FunctionReturns
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.

On this page