LM-Kit OneDocs2026.8.10lm-kit.com
Infrastructure

Administration

Authenticates an operator and returns a session token.#

POST/lmkit/v1/admin/login

Verifies an operator's username and password and, when enrolled, a TOTP second factor. On success returns an opaque session token to be sent on subsequent requests via the X-Admin-Password header. A request without a username signs in the legacy 'admin' account, kept for automation written against the shared-password era. When the credentials are correct but a second factor is required, responds 200 with requiresTotp=true and no token; resubmit including the code.

Request body

text/json ·

PropertyTypeDescription
usernamestring
passwordstring
totpCodestring
newPasswordstring
rememberboolean

Responses

StatusTypeDescription
200

OK

401

Unauthorized

429

Too Many Requests

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/login" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "username": "string",
  "password": "string",
  "totpCode": "string",
  "newPassword": "string"
}'

Lists the live admin sessions (admin).#

GET/lmkit/v1/admin/sessions

Every live session with the door that minted it (password or sso), who signed in when the door knows, and its timestamps. Rows are addressed by an opaque id; the bearer tokens never leave the server.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/sessions" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Revokes one admin session by its id (admin).#

POST/lmkit/v1/admin/sessions/revoke

Request body

text/json ·

PropertyTypeDescription
idstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/sessions/revoke" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "string"
}'

Revokes every admin session but the caller's own (admin).#

POST/lmkit/v1/admin/sessions/revoke-others

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/sessions/revoke-others" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Revokes the current admin session.#

POST/lmkit/v1/admin/logout

Responses

StatusTypeDescription
200application/json

OK

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/logout" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Exchanges the admin session for the web-area ticket cookie.#

POST/lmkit/v1/admin/area-ticket

Admin-gated web areas are opened by plain page navigations, which cannot carry the session header, so the browser proves the session once here and receives an HttpOnly cookie the page gates check.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/area-ticket" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Reports the caller's second-factor state and the org policy.#

GET/lmkit/v1/admin/2fa/status

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/2fa/status" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Begins TOTP enrollment for the caller's own account.#

POST/lmkit/v1/admin/2fa/setup

Generates a pending TOTP secret for the signed-in operator and returns it together with an otpauth:// URI for authenticator apps. The secret only becomes active after it is confirmed via /2fa/enable with a valid code, which also returns the account's single-use recovery codes.

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/2fa/setup" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Confirms and activates TOTP enrollment.#

POST/lmkit/v1/admin/2fa/enable

Request body

text/json ·

PropertyTypeDescription
codestring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/2fa/enable" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "string"
}'

Disables the TOTP second factor.#

POST/lmkit/v1/admin/2fa/disable

Requires a valid current authentication code so that a hijacked session alone cannot strip the second factor.

Request body

text/json ·

PropertyTypeDescription
codestring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/2fa/disable" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "string"
}'

Returns the current server configuration.#

GET/lmkit/v1/admin/configuration

Returns all configurable settings grouped by section. Includes a defaults section for reset-to-default support. Requires the X-Admin-Password header when an admin password is configured.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/configuration" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Updates server configuration.#

PUT/lmkit/v1/admin/configuration

Accepts a partial configuration update. Only the supplied fields are modified. Requires the X-Admin-Password header when an admin password is configured.

Request body

application/json ·

PropertyTypeDescription
generalone of object ·
modelsone of object ·
ocrone of object ·
documentSigningone of object ·
hardwareone of object ·
fileManagementone of object ·
inferenceone of object ·
securityone of object ·
telemetryone of object ·
mcpone of object ·
webAreasone of object ·
skillsone of object ·
ssoone of object ·
toolsone of object ·
portsone of object ·
connectors[]
memoryone of object ·
agents[]

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/configuration" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "connectors": [
    {
      "name": "string",
      "enabled": false,
      "transport": "string",
      "url": "string"
    }
  ],
  "agents": [
    {
      "name": "string",
      "description": "string",
      "system": "string",
      "skill": "string"
    }
  ]
}'

Reports whether the resolved ffmpeg binary actually runs.#

GET/lmkit/v1/admin/ffmpeg/status

Probes the ffmpeg binary the server currently resolves (the admin 'FFmpeg Path' setting when set, else the LMKIT_FFMPEG_PATH environment variable, else the server-managed download when installed, else 'ffmpeg' on PATH) and reports the outcome: whether it is runnable, the resolved path, which layer supplied it ('setting' / 'environment' / 'managed' / 'path'), and the probed version line as proof. The probe is cached per resolved path, so this is cheap to call and a path change (saved from the config form) re-answers on the next call. Also carries the managed-install state: whether a managed binary is on disk, whether a static build is published for this platform, and the progress of an in-flight or just-finished managed download so the config form can render it. This is what the config form's FFmpeg Path status line reads: audio transcoding and video frame extraction both depend on this binary.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/ffmpeg/status" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Downloads and installs a managed ffmpeg build for this platform.#

POST/lmkit/v1/admin/ffmpeg/download

Starts a background download of a static ffmpeg build matching the server's OS and CPU architecture, installing it into the server-managed tools directory. Builds come from the community static-build projects (BtbN's FFmpeg-Builds GitHub releases for Windows, the ffbinaries prebuilt releases for Linux, ffmpeg.martin-riedl.de for macOS) and must pass a -version probe before activation, so a corrupt or wrong-architecture download is discarded rather than installed. Once installed, the binary is used automatically whenever neither the FFmpeg Path setting nor the LMKIT_FFMPEG_PATH environment variable points elsewhere, and audio transcoding plus video frame extraction light up without a restart. Poll 'ffmpeg/status' for progress. 409 when a download is already running, 422 when no static build is published for this platform.

Responses

StatusTypeDescription
202application/json

Accepted

401

Unauthorized

409

Conflict

422

Unprocessable Entity

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/ffmpeg/download" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Removes the managed ffmpeg install.#

DELETE/lmkit/v1/admin/ffmpeg/managed

Deletes the binary previously installed by 'ffmpeg/download' from the server-managed tools directory, so ffmpeg resolution falls back to the system PATH (or whatever the FFmpeg Path setting and LMKIT_FFMPEG_PATH environment variable dictate). Use it when a system-wide install should take over from the managed copy. 409 while a managed download is running.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

409

Conflict

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/ffmpeg/managed" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Runs a functional self-test of the resolved ffmpeg binary.#

POST/lmkit/v1/admin/ffmpeg/test

Exercises the resolved ffmpeg end to end instead of trusting its -version banner: the binary first synthesizes a one-second audio+video clip from its built-in generators (no media asset, no network), then the clip runs through the server's two real media paths, the 16 kHz mono WAV transcode that transcription applies to every upload and the still-frame extraction behind video posters. Reports each step's outcome, duration, and artifact size; the test passes only when every step passes. Use it after pointing FFmpeg Path at a new binary or installing the managed download to prove decode and encode actually work on this host. Synchronous and cheap (a few hundred milliseconds when healthy, bounded at 30 seconds).

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/ffmpeg/test" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Prices a shared-slot-pool shape without allocating it#

GET/lmkit/v1/admin/inference/slot-pool-fit

Reports what the given slot count and per-slot window would cost on each loaded model's device, and what the device memory ceiling (Inference Memory Budget) would actually admit. This is the difference between 'my slot count is not applying' and 'it applied and the card refused it': a shape the device cannot hold is fitted down at attach time, slots first and then the window, so a panel that echoes back only the configured numbers reports a concurrency the server will not deliver. Read-only and non-destructive: the estimate consults the configured ceiling only, and unlike the real admission path it never evicts cached contexts or trims idle pools. Omitting the parameters prices the shape the server is currently configured with. Models whose native memory simulation is unavailable are omitted rather than reported as failures.

Parameters

NameInTypeDescription
slotsqueryobject (int32)
slotContextSizequeryobject (int32)
memoryRatioqueryobject (double)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/inference/slot-pool-fit" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Prices a shared-slot-pool shape together with a pending set of per-model overrides#

POST/lmkit/v1/admin/inference/slot-pool-fit

Same estimate as the GET form, with one difference: the body may carry an override set the operator has not saved yet, and every loaded model is priced at the shape that would actually govern IT once that set is applied. This is what lets an override be checked against the device before it is committed, rather than after a model refuses to open at it. Read-only and non-destructive; an omitted override list prices the saved one.

Request body

text/json ·

PropertyTypeDescription
slotsobject (int32)
slotContextSizeobject (int32)
memoryRatioobject (double)
modelOverrides[]

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/inference/slot-pool-fit" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "slots": "string",
  "slotContextSize": "string",
  "memoryRatio": "string",
  "modelOverrides": [
    {
      "modelId": "string",
      "slotCount": "string",
      "slotContextSize": "string",
      "embeddingContextSize": "string"
    }
  ]
}'

Returns the inference contexts (KV-caches) held in memory for a loaded model.#

GET/lmkit/v1/admin/models/contexts

Lists every context the given model is keeping resident: the shared context of each attached parallel decoder, those actively in use, and those idle in the recycle pool. Each entry reports its token capacity, KV-cache memory footprint, residency state, and device, which is the detail behind a model's KV-cache count. A decoder's shared context additionally reports its slot shape (slot count, per-slot window, busy slots, queued requests, tracked conversations), since its capacity is a pool serving many concurrent requests rather than one session's window. Returns 404 when the model is not loaded.

Parameters

NameInTypeDescription
uriquerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/models/contexts" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Hibernates every in-memory inference context held by a single loaded model.#

POST/lmkit/v1/admin/models/hibernate

Schedules background hibernation of one model's live contexts, and their speculative-decoding draft siblings, serializing each context's state to disk and releasing device and host memory. This is a one-shot action, not a persisted setting, so it does not alter the saved configuration. A context that is mid-decode hibernates once it frees up, and any session rehydrates transparently on its next request. Returns the number of contexts scheduled. Requires the X-Admin-Password header when an admin password is configured.

Request body

text/json ·

PropertyTypeDescription
modelUristring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/hibernate" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "modelUri": "string"
}'

Returns model catalog grouped by capability.#

GET/lmkit/v1/admin/models

Returns non-legacy predefined models from the LM-Kit catalog, organized by server role. Requires the X-Admin-Password header when an admin password is configured.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/models" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns available GPU devices.#

GET/lmkit/v1/admin/devices

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/devices" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns fast-changing dashboard metrics suitable for high-frequency polling.#

GET/lmkit/v1/admin/dashboard/live

Excludes the loaded-model details list and upload-directory stats, which are served separately by GET /admin/dashboard/snapshot. Safe to poll once per second.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/dashboard/live" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns a complete CPU-RAM diagnostic breakdown of the server process.#

GET/lmkit/v1/admin/memory/diagnostics

Aggregates the OS process view, the .NET managed heap (per-generation sizes, fragmentation, GC mode), OS-specific figures (Linux /proc/self/status and smaps_rollup, cgroup limits, the glibc allocator ledger), host physical memory, and what LM-Kit holds (model weights, KV-cache, contexts). Intended for on-demand use when the operator opens the memory panel, not high-frequency polling.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/memory/diagnostics" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Runs a blocking, compacting full garbage collection and reports what was reclaimed.#

POST/lmkit/v1/admin/memory/gc-collect

Forces a full Gen2 collection with a one-time large-object-heap compaction, then returns the before/after working set and managed heap so the operator can see the effect.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/memory/gc-collect" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Asks the native allocator to return freed-but-retained memory to the OS.#

POST/lmkit/v1/admin/memory/trim

On glibc this calls malloc_trim(0), the direct lever for the arena-retention RSS growth seen under high-concurrency churn on Linux. On Windows it empties the process working set. Reports the before/after resident set so the operator can see the effect.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/memory/trim" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Clears rebuildable LM-Kit SDK caches and reports what was reclaimed.#

POST/lmkit/v1/admin/memory/clear-caches

Drops the idle OCR engine pool, the idle inference-context recycle pool, and per-model tokenization / embedding lookup caches, then runs a collection. Loaded model weights and in-use contexts are never touched, so it is safe on a live server; the only cost is that the next request rebuilds what was dropped.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/memory/clear-caches" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the heavier dashboard snapshot (upload-directory stats).#

GET/lmkit/v1/admin/dashboard/snapshot

Intended for on-demand refresh; not for high-frequency polling.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/dashboard/snapshot" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns live dashboard metrics.#

GET/lmkit/v1/admin/dashboard

Parameters

NameInTypeDescription
logLinesqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/dashboard" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Triggers manual file cleanup of expired uploads.#

POST/lmkit/v1/admin/files/cleanup

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/files/cleanup" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns live OpenTelemetry instruments discovered from watched meters, including per-tag-set breakdowns and histogram bucket distributions.#

GET/lmkit/v1/admin/telemetry/status

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/telemetry/status" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Streams telemetry snapshots via Server-Sent Events at 1Hz. Avoids the polling round-trip the panel used to do every second.#

GET/lmkit/v1/admin/telemetry/stream

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/telemetry/stream" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns recent alert history (up to 200 entries).#

GET/lmkit/v1/admin/alerts/history

Parameters

NameInTypeDescription
countqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/alerts/history" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Clears all recorded alerts. Returns the number of entries removed. Audit-logged to ActivityLog + LogManager so operators can trace who cleared the list.#

DELETE/lmkit/v1/admin/alerts/history

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/alerts/history" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Dismisses the dashboard alert banner: mutes every currently-recorded alert so the banner disappears until a NEW threshold breach fires. The alerts are not deleted - the Alerts page still lists them and GET alerts/history returns them. Returns the number of alerts muted. Audit-logged.#

POST/lmkit/v1/admin/alerts/dismiss

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/alerts/dismiss" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the latest restart-cause report, produced when the server detects that its previous run terminated without a clean shutdown (crash, OOM kill, host reboot, ...). Includes the classified cause, confidence, recommendation, and the raw OS-level evidence lines.#

GET/lmkit/v1/admin/diagnostics/restart-report

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/diagnostics/restart-report" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the restart history: one entry per server start (normal start, admin restart, or crash recovery), newest first. Crash recoveries carry the full restart-cause report with evidence, so past incidents stay diagnosable long after their dashboard banner was dismissed.#

GET/lmkit/v1/admin/diagnostics/restart-history

Parameters

NameInTypeDescription
countqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/diagnostics/restart-history" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Acknowledges (dismisses) the current restart-cause report so the dashboard banner disappears. The dismissal is persisted and audit-logged; the report itself remains retrievable from GET diagnostics/restart-report.#

POST/lmkit/v1/admin/diagnostics/restart-report/acknowledge

Request body

text/json ·

PropertyTypeDescription
idstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/diagnostics/restart-report/acknowledge" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "string"
}'

Queries the persistent audit log (admin actions, alerts, control events). Supports filtering by minimum severity, source category, and a since-timestamp, with a hard limit of 5000 entries per call. The same store backs the in-memory dashboard activity feed; this endpoint is the durable history that survives process restarts.#

GET/lmkit/v1/admin/audit/history

Parameters

NameInTypeDescription
sincequerystring
minLevelquerystring
sourcequerystring
limitqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/audit/history" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the audit log as JSON Lines (one JSON object per line) for ingestion into log aggregators (Splunk, Datadog, ELK, Sentinel). Optionally filter by a since-timestamp.#

GET/lmkit/v1/admin/audit/export

Parameters

NameInTypeDescription
sincequerystring

Responses

StatusTypeDescription
200application/jsonl

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/audit/export" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the actual disk usage of the model storage directory by scanning the filesystem. Reports total bytes on disk, file count, and the resolved directory path. This is the authoritative figure for 'how much space do the downloaded models take'. Summing catalog-metadata sizes can mislead because it counts only models the catalog knows about and uses each model's nominal file size, not what is actually on disk.#

GET/lmkit/v1/admin/models/disk-usage

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/models/disk-usage" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the top host processes by CPU usage. CPU% is computed from the delta of TotalProcessorTime between successive calls; the first call after process start returns 0% for every entry, so callers that want meaningful values should poll at a few-second cadence.#

GET/lmkit/v1/admin/processes

Parameters

NameInTypeDescription
topqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/processes" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns recent request latency percentiles (P50/P90/P95/P99).#

GET/lmkit/v1/admin/metrics/latency

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/metrics/latency" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns per-endpoint aggregated stats (count / latency / error rate).#

GET/lmkit/v1/admin/metrics/endpoints

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/metrics/endpoints" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Clears recorded metric history (in-memory). Charts reset to empty.#

POST/lmkit/v1/admin/metrics/history/reset

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/metrics/history/reset" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the persisted per-instrument time-series history (up to 1 hour at 1 Hz). Used by the telemetry panel to seed its live charts so users see real history when they open the page hours after the server started.#

GET/lmkit/v1/admin/telemetry/history

Parameters

NameInTypeDescription
countqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/telemetry/history" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns one instrument's durable, downsampled time-series over a window (seconds). Backs the telemetry panel's long windows (1h .. 7d) and survives a process restart, unlike the in-memory ring which is wiped on restart.#

GET/lmkit/v1/admin/telemetry/series

Parameters

NameInTypeDescription
instrumentquerystring
windowqueryobject (int32)
pointsqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/telemetry/series" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Resets every OpenTelemetry instrument snapshot collected by the admin panel (counts, sums, bucket counts, per-tag-set state).#

POST/lmkit/v1/admin/telemetry/reset

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/telemetry/reset" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns recent samples for each metric tracked by the live dashboard.#

GET/lmkit/v1/admin/metrics/history

Parameters

NameInTypeDescription
countqueryobject (int32)
stridequeryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/metrics/history" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns accurate window statistics (avg/min/max/last) per dashboard metric, computed from the raw 1 Hz samples.#

GET/lmkit/v1/admin/metrics/stats

Parameters

NameInTypeDescription
countqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/metrics/stats" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the current OCR engine status: provider, in-flight operations, and concurrency configuration.#

GET/lmkit/v1/admin/ocr/status

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/ocr/status" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the list of currently in-flight inference requests.#

GET/lmkit/v1/admin/inferences/active

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/inferences/active" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the API requests currently in flight, for the dashboard 'Active requests' panel.#

GET/lmkit/v1/admin/requests/active

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/requests/active" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the inferences currently waiting for a scheduler slot, for the dashboard 'Queue depth' panel.#

GET/lmkit/v1/admin/queue/active

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/queue/active" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the background jobs currently processing, for the dashboard 'Active jobs' panel.#

GET/lmkit/v1/admin/jobs/active

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/jobs/active" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Cancels one in-flight background job from the admin console (admin override, any owner).#

POST/lmkit/v1/admin/jobs/{id}/cancel

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/jobs/$ID/cancel" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists every API key the server accepts as a bearer token. Tokens are returned redacted.#

GET/lmkit/v1/admin/apikeys

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Mints a new API key. The raw token is returned ONCE in this response - it cannot be re-displayed later.#

POST/lmkit/v1/admin/apikeys

Request body

text/json ·

PropertyTypeDescription
namestring
scopestring
expiresInDaysobject (int32)
clusterGrantsstring[]
allClustersboolean

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "scope": "string",
  "expiresInDays": "string",
  "clusterGrants": [
    "string"
  ]
}'

Revokes (disables but retains) an API key.#

POST/lmkit/v1/admin/apikeys/{id}/revoke

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID/revoke" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Re-enables a previously revoked API key.#

POST/lmkit/v1/admin/apikeys/{id}/restore

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID/restore" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Regenerates an API key's token. The key keeps its identity and access to all its resources; the old token stops working immediately. The new token is returned ONCE.#

POST/lmkit/v1/admin/apikeys/{id}/regenerate

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID/regenerate" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Updates the display name of an API key. The token and usage statistics are preserved.#

POST/lmkit/v1/admin/apikeys/{id}/rename

Parameters

NameInTypeDescription
idrequiredpathstring

Request body

text/json ·

PropertyTypeDescription
namestring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID/rename" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string"
}'

Sets which server-executed tools a key may use in chat: null follows the server policy, an empty list locks tools off, names narrow the policy.#

POST/lmkit/v1/admin/apikeys/{id}/tool-grants

Parameters

NameInTypeDescription
idrequiredpathstring

Request body

text/json ·

PropertyTypeDescription
grantsstring[]

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID/tool-grants" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "grants": [
    "string"
  ]
}'

Sets which search clusters a key may address: null restores the open default (any cluster), an empty list locks clusters off, ids restrict to those clusters.#

POST/lmkit/v1/admin/apikeys/{id}/cluster-grants

Parameters

NameInTypeDescription
idrequiredpathstring

Request body

text/json ·

PropertyTypeDescription
grantsstring[]

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID/cluster-grants" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "grants": [
    "string"
  ]
}'

Reports what one API key can reach in Search: its cluster grants, every configured cluster, and the tenants granted to it in each.#

GET/lmkit/v1/admin/apikeys/{id}/search-access

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID/search-access" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Permanently deletes an API key. Use revoke if you might re-enable it later.#

DELETE/lmkit/v1/admin/apikeys/{id}

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/apikeys/$ID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Mints a seconds-lived ticket that authorizes one stream or download URL.#

POST/lmkit/v1/admin/stream-ticket

EventSource connections and anchor-tag downloads cannot carry the X-Admin-Password header, and the session token itself never rides a query string (URLs persist in proxy logs and browser history). This mints a ticket bound to one purpose ('events', 'telemetry', or 'uploads') that expires within seconds; pass it as ?ticket= to the matching endpoint.

Request body

text/json ·

PropertyTypeDescription
purposestring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/stream-ticket" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "purpose": "string"
}'

Server-Sent Events stream that emits dashboard, inferences, and downloads ticks every second from a single long-lived connection. Replaces the three 1Hz polling endpoints (the polling endpoints still work as fallback).#

GET/lmkit/v1/admin/events

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/events" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns a security-posture audit: every hardening control the server exposes, whether it is at its recommended setting, and what to change to reach optimal security.#

GET/lmkit/v1/admin/security/audit

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/security/audit" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Sets the first operator password, or changes the caller's own. Requires an authorized admin session.#

POST/lmkit/v1/admin/security/admin-password

While no operator account exists, this creates the first one ('admin', Owner) with the given password. Once accounts exist it changes the calling operator's own password and requires the current one; the account's other sessions and remembered devices are signed out.

Request body

application/json ·

PropertyTypeDescription
newPasswordstring
currentPasswordstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/security/admin-password" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "newPassword": "string",
  "currentPassword": "string"
}'

Lists the operator accounts (admin).#

GET/lmkit/v1/admin/security/operators

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/security/operators" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Creates a new operator account (admin).#

POST/lmkit/v1/admin/security/operators

Adds a named operator with its own credential. Role is one of owner, admin, or viewer (stored now, enforced once role gates ship).

Request body

application/json ·

PropertyTypeDescription
usernamestring
displayNamestring
emailstring
rolestring
passwordstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

409

Conflict

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/security/operators" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "username": "string",
  "displayName": "string",
  "email": "string",
  "role": "string"
}'

Describes the caller's own identity and access tier.#

GET/lmkit/v1/admin/security/me

Who this session belongs to and what it may do: the operator's username and role for a local sign-in, the account identity for an SSO sign-in, or the open unprovisioned surface. The panel uses it to offer only the surfaces the role can act on.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/security/me" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Updates an operator's profile and role (Owner).#

PUT/lmkit/v1/admin/security/operators/{id}

Parameters

NameInTypeDescription
idrequiredpathinteger (int64)

Request body

application/json ·

PropertyTypeDescription
displayNamestring
emailstring
rolestring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

409

Conflict

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/security/operators/$ID" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "displayName": "string",
  "email": "string",
  "role": "string"
}'

Deletes an operator account (Owner).#

DELETE/lmkit/v1/admin/security/operators/{id}

Removes the account permanently and ends its sessions. Prefer disabling, which keeps the name attributable in old audit entries; deletion is for accounts created in error.

Parameters

NameInTypeDescription
idrequiredpathinteger (int64)

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/security/operators/$ID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Enables or disables an operator account (Owner).#

POST/lmkit/v1/admin/security/operators/{id}/enabled

Disabling is the preferred way to retire an operator: sign-in is refused, its sessions and remembered devices end, and its name stays attributable in the audit trail.

Parameters

NameInTypeDescription
idrequiredpathinteger (int64)

Request body

application/json ·

PropertyTypeDescription
enabledboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/security/operators/$ID/enabled" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false
}'

Resets an operator's password to a one-time value (Owner).#

POST/lmkit/v1/admin/security/operators/{id}/reset-password

Assigns a temporary password the operator must replace at the next sign-in. The account's sessions and remembered devices end immediately, so only the holder of the one-time value can return.

Parameters

NameInTypeDescription
idrequiredpathinteger (int64)

Request body

application/json ·

PropertyTypeDescription
newPasswordstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/security/operators/$ID/reset-password" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "newPassword": "string"
}'

Returns metadata about the TLS certificate Kestrel is currently serving with, plus an inventory of TLS protocols and cipher suites available to the host.#

GET/lmkit/v1/admin/tls/info

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/tls/info" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Uploads a PEM or PFX certificate bundle. The file is validated, re-exported to a stable per-server path, and used on the next restart. Restart the server (or click the Restart button on the dashboard) to apply.#

POST/lmkit/v1/admin/tls/certificate

Request body

application/x-www-form-urlencoded · object

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/tls/certificate" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/x-www-form-urlencoded"

Removes the admin-uploaded TLS certificate so the server reverts to the self-signed fallback on the next restart.#

DELETE/lmkit/v1/admin/tls/certificate

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/tls/certificate" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the current ACME (Let's Encrypt) automatic-TLS settings and whether they are active on this run.#

GET/lmkit/v1/admin/tls/acme

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/tls/acme" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Updates the ACME (Let's Encrypt) automatic-TLS settings. Persisted to appsettings.json; a server restart is required to apply.#

POST/lmkit/v1/admin/tls/acme

Request body

application/json ·

PropertyTypeDescription
enabledboolean
domainNamesstring[]
emailAddressstring
acceptTermsOfServiceboolean
useStagingServerboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/tls/acme" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false,
  "domainNames": [
    "string"
  ],
  "emailAddress": "string",
  "acceptTermsOfService": false
}'

Lists every recurring server-side maintenance task and its last run, last duration, last status, and computed next run.#

GET/lmkit/v1/admin/scheduler/jobs

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/scheduler/jobs" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Triggers one immediate pass of a named recurring maintenance task. The next scheduled tick is unaffected.#

POST/lmkit/v1/admin/scheduler/jobs/{name}/run

Parameters

NameInTypeDescription
namerequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/scheduler/jobs/$NAME/run" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Requests cancellation of every in-flight inference. Returns the number of inferences that were active when the call was made.#

POST/lmkit/v1/admin/inferences/cancel-all

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/inferences/cancel-all" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Initiates a graceful server restart. In-flight inferences are cancelled, a fresh child process is spawned with the same command-line args + environment, and the current host stops cleanly. The child waits for this process to fully exit before binding its listeners, so there is a brief window of unavailability but no port conflict.#

POST/lmkit/v1/admin/server/restart

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/server/restart" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Requests cancellation of an in-flight inference by aborting the underlying HTTP connection.#

POST/lmkit/v1/admin/inferences/{id}/cancel

Parameters

NameInTypeDescription
idrequiredpathinteger (int64)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/inferences/$ID/cancel" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the most recent activity feed entries.#

GET/lmkit/v1/admin/activity/recent

Parameters

NameInTypeDescription
countqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/activity/recent" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Downloads the complete retained log history.#

GET/lmkit/v1/admin/logs/download

Streams every retained log file (server.log plus all rotated archives) concatenated oldest-first as a single text/plain download. The dashboard polling endpoint is capped at 500 lines for low-latency UI updates; this endpoint is the canonical way to retrieve the full on-disk history.

Responses

StatusTypeDescription
200text/plain

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/logs/download" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the retained log history as JSON, with cursor pagination for scroll-back.#

GET/lmkit/v1/admin/logs/file

Reads every retained log file (server.log plus rotated archives) and returns a page of entries in chronological order. Without beforeLine: returns the most recent maxLines entries (the tail). With beforeLine=K: returns up to maxLines entries strictly older than line K, for scroll-up pagination. Lines are numbered 1..totalLines across the full retained set (1 = oldest, totalLines = newest). Response envelope: { logs, totalLines, totalBytes, truncated, fromLine, toLine, files }. fromLine/toLine bracket the returned page; pass fromLine back as the next beforeLine to walk further into history. truncated=true on the tail call means the full set exceeds the cap (use /logs/download for the complete archive). maxLines defaults to 20000 and is clamped to [100, 200000]; the UI uses 2000 per scroll batch.

Parameters

NameInTypeDescription
maxLinesqueryobject (int32)
beforeLinequeryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/logs/file" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Clears the server log file.#

POST/lmkit/v1/admin/logs/clear

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/logs/clear" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Clears the request history.#

POST/lmkit/v1/admin/requests/clear

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/requests/clear" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the recorded request history with filters and sorting. Use this for audit and incident investigation.#

GET/lmkit/v1/admin/requests

All filter parameters are optional and AND-combine. method: GET/POST/etc. statusClass: 2xx/3xx/4xx/5xx. statusCode: exact status code (overrides statusClass). path: case-insensitive substring of the request path. clientIp: exact match. apiKeyId: stable identifier from ApiKeyStore (exact match). apiKey: case-insensitive substring of the audit-safe display form (key name or redacted token). requestId: exact match. minMs/maxMs: duration bounds in milliseconds. keyPresence: anonymous (no key supplied) or identified (any key supplied). hasError: true => only rows with a captured error summary, false => only rows without one. sinceUtc/untilUtc: ISO-8601 inclusive bounds. limit: page size, clamped to a server-side maximum (default 200). offset: row offset for pagination (default 0, requires SQLite path). sort: newest (default), oldest, slowest, fastest, status.

Parameters

NameInTypeDescription
methodquerystring
statusClassquerystring
statusCodequeryobject (int32)
pathquerystring
pathExactquerystring
clientIpquerystring
apiKeyIdquerystring
apiKeyquerystring
requestIdquerystring
minMsqueryobject (double)
maxMsqueryobject (double)
keyPresencequerystring
hasErrorqueryboolean
sinceUtcquerystring (date-time)
untilUtcquerystring (date-time)
limitqueryobject (int32)
offsetqueryobject (int32)
sortquerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/requests" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns a bucketed request-count timeseries for the same filter shape as /requests.#

GET/lmkit/v1/admin/requests/timeseries

Aggregates rows in the request audit store into fixed-width time buckets. Drives the request-volume chart on the admin Requests page. When sinceUtc is omitted the window starts at the oldest matching row, so the series covers the full filtered history. When bucketSeconds is omitted a width is auto-selected so the window spans at most ~120 buckets. The response echoes the effective sinceUtc/untilUtc/bucketSeconds used.

Parameters

NameInTypeDescription
methodquerystring
statusClassquerystring
statusCodequeryobject (int32)
pathquerystring
pathExactquerystring
clientIpquerystring
apiKeyIdquerystring
apiKeyquerystring
requestIdquerystring
minMsqueryobject (double)
maxMsqueryobject (double)
keyPresencequerystring
hasErrorqueryboolean
sinceUtcquerystring (date-time)
untilUtcquerystring (date-time)
bucketSecondsqueryobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/requests/timeseries" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns an aggregate summary (status mix, latency percentiles, byte totals) of the rows matching the same filters as /requests.#

GET/lmkit/v1/admin/requests/stats

Aggregates the FULL filtered result set, not one page: total row count, per-status-class counts, combined error rate, p50/p95/avg/max duration, and request/response byte totals. Drives the stats strip above the audit-log table. All filter parameters mirror /requests.

Parameters

NameInTypeDescription
methodquerystring
statusClassquerystring
statusCodequeryobject (int32)
pathquerystring
pathExactquerystring
clientIpquerystring
apiKeyIdquerystring
apiKeyquerystring
requestIdquerystring
minMsqueryobject (double)
maxMsqueryobject (double)
keyPresencequerystring
hasErrorqueryboolean
sinceUtcquerystring (date-time)
untilUtcquerystring (date-time)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/requests/stats" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns top-talker aggregates (by API key or client IP) over the rows matching the same filters as /requests.#

GET/lmkit/v1/admin/requests/aggregate

Groups the filtered rows by API key (by=key, default) or client IP (by=client) and returns the busiest groups first: request count, 4xx/5xx split, error rate, p50/p95 latency, and last-seen timestamp. Key buckets carry the stable ApiKeyStore id when the token resolved, so a row can be turned into an apiKeyId filter with one click. Anonymous traffic collapses into a single empty-id bucket. top caps the group count (default 25, max 100).

Parameters

NameInTypeDescription
byquerystring
topqueryobject (int32)
methodquerystring
statusClassquerystring
statusCodequeryobject (int32)
pathquerystring
pathExactquerystring
clientIpquerystring
apiKeyIdquerystring
apiKeyquerystring
requestIdquerystring
minMsqueryobject (double)
maxMsqueryobject (double)
keyPresencequerystring
hasErrorqueryboolean
sinceUtcquerystring (date-time)
untilUtcquerystring (date-time)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/requests/aggregate" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Exports recorded requests as CSV, with the same filters as the /requests endpoint.#

GET/lmkit/v1/admin/requests/export

Streams every persisted row that matches the supplied filter as CSV (one row per request). Designed for incident export and downstream analysis: open in Excel / a pandas dataframe / a BI tool. No row cap is applied: exports walk the full filtered result set, not just the current page. All filter parameters mirror /requests.

Parameters

NameInTypeDescription
methodquerystring
statusClassquerystring
statusCodequeryobject (int32)
pathquerystring
pathExactquerystring
clientIpquerystring
apiKeyIdquerystring
apiKeyquerystring
requestIdquerystring
minMsqueryobject (double)
maxMsqueryobject (double)
keyPresencequerystring
hasErrorqueryboolean
sinceUtcquerystring (date-time)
untilUtcquerystring (date-time)
sortquerystring

Responses

StatusTypeDescription
200text/csv

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/requests/export" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Starts a model download as a background task.#

POST/lmkit/v1/admin/downloads/start

Schedules a background download for the supplied modelId and returns immediately. Progress is reported through GET /admin/downloads/active and the download survives client disconnects or page reloads. Cancel via POST /admin/downloads/cancel. Requires the X-Admin-Password header when an admin password is configured.

Request body

application/json ·

PropertyTypeDescription
modelIdstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/downloads/start" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "modelId": "string"
}'

Cancels an in-progress model download.#

POST/lmkit/v1/admin/downloads/cancel

Request body

application/json ·

PropertyTypeDescription
modelIdstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/downloads/cancel" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "modelId": "string"
}'

Returns the list of active and recently completed downloads.#

GET/lmkit/v1/admin/downloads/active

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/downloads/active" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Tests AWS Textract connectivity with the supplied credentials.#

POST/lmkit/v1/admin/ocr/textract/test

Signs a minimal Textract DetectDocumentText request with SigV4 and sends it to the target region. Any field left blank (including a masked secret of ****) falls back to the stored server configuration.

Request body

application/json ·

PropertyTypeDescription
awsAccessKeyIdstring
awsSecretAccessKeystring
awsRegionstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/ocr/textract/test" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "awsAccessKeyId": "string",
  "awsSecretAccessKey": "string",
  "awsRegion": "string"
}'

Streams log entries in real-time via Server-Sent Events.#

GET/lmkit/v1/admin/logs/stream

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/logs/stream" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Downloads the current appsettings.json configuration.#

GET/lmkit/v1/admin/config/export

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/config/export" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Uploads and replaces the appsettings.json configuration.#

POST/lmkit/v1/admin/config/import

Replaces the whole settings file, every section included. Because that reaches the Owner-only sections (Security, SSO) the piecemeal configuration API refuses to Admin sessions, the import needs the Owner role: anything less would let an Admin write through the file what the API refuses at the boundary.

Request body

multipart/form-data · object

PropertyTypeDescription
file

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

403

Forbidden

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/config/import" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: multipart/form-data"

Unloads a model from memory.#

POST/lmkit/v1/admin/models/unload

Request body

text/json ·

PropertyTypeDescription
modelUristring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/unload" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "modelUri": "string"
}'

Loads a model into memory by model ID.#

POST/lmkit/v1/admin/models/load

Request body

text/json ·

PropertyTypeDescription
modelUristring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/load" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "modelUri": "string"
}'

Deletes a downloaded model file from disk.#

POST/lmkit/v1/admin/models/delete

Request body

text/json ·

PropertyTypeDescription
modelUristring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/delete" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "modelUri": "string"
}'

Deletes every file in the model storage directory. Unloads any in-memory models first.#

POST/lmkit/v1/admin/models/delete-all

Wipes the contents of the configured model directory. Any currently-loaded model is unloaded first so its on-disk file can be removed (unloads that fail because the model is in use leave that file skipped and counted in 'skippedInUse'). Active downloads are cancelled best-effort. Returns the aggregate count and byte total of deleted files, plus a list of files that could not be deleted.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/delete-all" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the actual disk usage of the upload directory by scanning the filesystem. Reports total bytes on disk, file count (excluding .manifest sidecars), and the resolved directory path.#

GET/lmkit/v1/admin/uploads/disk-usage

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/uploads/disk-usage" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Deletes every file in the upload directory.#

POST/lmkit/v1/admin/uploads/delete-all

Wipes the contents of the configured upload directory, including manifest sidecars. Files locked by an in-flight request are skipped and reported in 'failed'. Returns the aggregate count and byte total of deleted files.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/uploads/delete-all" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the files in the upload directory for browsing in the admin console.#

GET/lmkit/v1/admin/uploads/files

Returns one entry per stored file (manifest sidecars excluded), each with its path relative to the upload root, its original upload name (resolved from the manifest when present), size, last modified time, and owner bucket. Use the path with the download endpoint to fetch a single file.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/uploads/files" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Downloads a single file from the upload directory by its path relative to the upload root.#

GET/lmkit/v1/admin/uploads/download

The path must stay inside the upload directory; any path that escapes it (".." traversal or an absolute path) is rejected. The file is served as an attachment under its original upload name.

Parameters

NameInTypeDescription
pathquerystring

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/uploads/download" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Downloads the entire upload directory as a single zip archive.#

GET/lmkit/v1/admin/uploads/download-all

Streams a zip of every file in the upload directory (including manifest sidecars), preserving the per-owner bucket structure. Files locked by an in-flight request are skipped.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/uploads/download-all" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the actual disk usage of the context hibernation directory by scanning the filesystem. Reports total bytes on disk, file count, and the resolved directory path.#

GET/lmkit/v1/admin/hibernation/disk-usage

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/hibernation/disk-usage" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Deletes every file in the context hibernation directory.#

POST/lmkit/v1/admin/hibernation/delete-all

Wipes the contents of the configured hibernation cache directory. Files locked by active sessions are skipped and reported in 'failed'. Returns the aggregate count and byte total of deleted files.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/hibernation/delete-all" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Creates a new Search cluster and initializes its schema.#

POST/lmkit/v1/admin/clusters/search

Request body

text/json ·

PropertyTypeDescription
clusterIdstring
isDefaultboolean
fullTextStorestring
vectorStorestring
qdrantUrlstring
qdrantApiKeystring
dataDirectorystring
connectionStringstring
hoststring
portobject (int32)
databasestring
usernamestring
passwordstring
adminUsernamestring
adminPasswordstring
maxConnectionsobject (int32)

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "clusterId": "string",
  "isDefault": false,
  "fullTextStore": "string",
  "vectorStore": "string"
}'

Tests a Search cluster connection without saving it.#

POST/lmkit/v1/admin/clusters/search/test

Request body

text/json ·

PropertyTypeDescription
clusterIdstring
isDefaultboolean
fullTextStorestring
vectorStorestring
qdrantUrlstring
qdrantApiKeystring
dataDirectorystring
connectionStringstring
hoststring
portobject (int32)
databasestring
usernamestring
passwordstring
adminUsernamestring
adminPasswordstring
maxConnectionsobject (int32)

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/test" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "clusterId": "string",
  "isDefault": false,
  "fullTextStore": "string",
  "vectorStore": "string"
}'

Tests an existing Search cluster connection. With no body it tests the cluster's stored connection; with a body it tests the supplied (edited) parameters, keeping the stored password where a field is left blank.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/test

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Request body

text/json ·

PropertyTypeDescription
clusterIdstring
isDefaultboolean
fullTextStorestring
vectorStorestring
qdrantUrlstring
qdrantApiKeystring
dataDirectorystring
connectionStringstring
hoststring
portobject (int32)
databasestring
usernamestring
passwordstring
adminUsernamestring
adminPasswordstring
maxConnectionsobject (int32)

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/test" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "clusterId": "string",
  "isDefault": false,
  "fullTextStore": "string",
  "vectorStore": "string"
}'

Returns an existing Search cluster's connection parameters (passwords redacted) so the admin UI can pre-fill the edit form.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/connection

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/connection" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Changes an existing Search cluster's connection parameters. Blank password fields keep the stored password. The new connection is validated and migrated before it is persisted; on failure the previous connection is restored.#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/connection

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Request body

application/json ·

PropertyTypeDescription
clusterIdstring
isDefaultboolean
fullTextStorestring
vectorStorestring
qdrantUrlstring
qdrantApiKeystring
dataDirectorystring
connectionStringstring
hoststring
portobject (int32)
databasestring
usernamestring
passwordstring
adminUsernamestring
adminPasswordstring
maxConnectionsobject (int32)

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/connection" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "clusterId": "string",
  "isDefault": false,
  "fullTextStore": "string",
  "vectorStore": "string"
}'

Deletes a Search cluster from configuration. Data in PostgreSQL is left intact.#

DELETE/lmkit/v1/admin/clusters/search/{clusterId}

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Sets a Search cluster as default.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/default

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/default" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists every tenant in a Search cluster, across all owners.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/tenants

The expensive per-tenant page/vector totals are served from a short-lived cache so the list renders immediately; a tenant whose totals are still being computed is flagged statsPending. Pass fresh=true to recompute every count synchronously (the explicit per-tenant Refresh action).

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
freshqueryboolean

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Provisions a new tenant in a Search cluster.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Request body

text/json ·

PropertyTypeDescription
displayNamestring
grantKeyIdsstring[]

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "displayName": "string",
  "grantKeyIds": [
    "string"
  ]
}'

Lists API keys and whether each one can access a tenant (per-key grant).#

GET/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/access

A key can reach the tenant when it has been granted that tenant. Revoked keys are omitted.

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/access" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Grants or revokes one API key's access to one tenant (per-tenant grant).#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/access

Granting adds an access grant for this one key on this one tenant; revoking removes it. Grants are additive and per-tenant, so they never affect the key's access to any other tenant. Revoking a key that reached the tenant through ownership retires that ownership (granting the owner's other active keys first) so the revoke takes effect.

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
apiKeyIdstring
grantboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/access" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "apiKeyId": "string",
  "grant": false
}'

Returns operational health for a Search cluster.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/health

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/health" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Sets a Search cluster's storage-volume size for the admin disk-usage bar. Display metadata only - PostgreSQL cannot read the OS volume size on a managed instance - so it never touches the database and works even when the backend is read-only or full. Pass maxStorageGb (0 clears it).#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/storage

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Request body

application/json ·

PropertyTypeDescription
maxStorageGbobject (double)

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/storage" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "maxStorageGb": "string"
}'

Estimates per-column on-disk storage for a Search cluster's heavy tables (sampled pg_column_size scaled by live row count). Tells apart a multi-GB column (e.g. ft_search.page_markdown) from a negligible one, to target space reclamation.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/column-storage

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/column-storage" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns database diagnostics for a Search cluster: server overview, per-index usage and size, and per-table access patterns.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/diagnostics

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/diagnostics" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the live state of the background embedding/reindex worker (process-global): status, current phase and operation age, trailing-window throughput per cluster, inference-lane occupancy, the data-plane admission-gate queue, parked tenants, and a recent event timeline. Lightweight and pollable - reads in-process state only, no database query.#

GET/lmkit/v1/admin/search/worker

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/search/worker" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the Search live-telemetry series (query latency/throughput, connection-gate and embedding-lane occupancy, worker write/drain/backlog, and live database health: delta cache-hit ratio, disk-read rate, transaction rate, active backends, and the longest-running query) as recent per-metric sample arrays, plus a database-health headline. Reads only the in-process metric ring and the sampler's last snapshot - no database query runs on this path, so the panel can poll it freely.#

GET/lmkit/v1/admin/search/metrics

Parameters

NameInTypeDescription
countqueryobject (int32)
stridequeryobject (int32)
clusterquerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/search/metrics" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns the cluster's cumulative per-query statistics from pg_stat_statements, ordered by total execution time: the aggregate view of what has cost the database the most since its statistics were last reset (catching the frequent-but-fast as well as the rare-but-huge). Installs the extension on first use; reports available=false when the managed instance does not preload it. Query text of other database roles may read '<insufficient privilege>' while its timings stay real.#

GET/lmkit/v1/admin/search/top-queries

Parameters

NameInTypeDescription
clusterquerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/search/top-queries" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Clears the cluster's slow-query views so they measure from a clean slate after a deploy: empties the in-memory live trace (finished entries keep their durable copy in the server log) and resets the database's cumulative pg_stat_statements ranking. statementsReset reports whether the database-side reset succeeded; a managed instance may refuse it when the admin role lacks the privilege, in which case the trace is still cleared and detail carries the database's error text.#

POST/lmkit/v1/admin/search/slow-queries/reset

Parameters

NameInTypeDescription
clusterquerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/search/slow-queries/reset" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Captures the query plan for a search under a tenant's row-level-security scope, so the plan reflects a real caller's query. Mode 'fulltext' (default) explains the BM25 inverted-index scan; mode 'vector' embeds the query with the tenant's model and explains the semantic retrieval.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/explain

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Request body

application/json ·

PropertyTypeDescription
tenant_idobject (int64)
querystring
ft_configstring
modestring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/explain" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tenant_id": "string",
  "query": "string",
  "ft_config": "string",
  "mode": "string"
}'

Refreshes PostgreSQL planner statistics (ANALYZE) for a Search cluster's tables so the planner uses the GIN and HNSW indexes instead of sequential and per-row scans. Autovacuum never analyzes the partitioned parent tables, so this is the supported way to keep statistics fresh. Safe to run on a live cluster.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/analyze

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/analyze" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Rebuilds the full-text GIN index across every ft_search partition for a Search cluster. Recovers an index left invalid (silently ignored by the planner, forcing a sequential scan); CREATE INDEX IF NOT EXISTS cannot repair an existing-but-invalid index. Holds a brief lock on ft_search while the GIN builds.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/rebuild-fulltext-index

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/rebuild-fulltext-index" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Rebuilds every invalid per-model vector HNSW index for a Search cluster so semantic and hybrid search use the index instead of a full scan. An invalid HNSW index is silently ignored by the planner. HNSW indexes can be large, so a rebuild can take minutes and holds a lock on its table while it builds; valid indexes are skipped.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/rebuild-vector-indexes

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/rebuild-vector-indexes" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Deletes a tenant's indexed data from a Search cluster. With scope=collections only its collections and data are removed and the tenant is kept; otherwise the whole tenant is offboarded. Runs in the background and reports live progress through the tenant list.#

DELETE/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)
scopequerystring

Responses

StatusTypeDescription
202application/json

Accepted

401

Unauthorized

404

Not Found

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Cancels an in-flight tenant deletion. The deletion's transaction is rolled back, so the tenant and all of its data are left fully intact.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/cancel-delete

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/cancel-delete" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Switches a tenant between dedicated vector partitions and the shared pool.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/whale

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
enabledboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/whale" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false
}'

Sets a tenant's embedding model (re-embeds its semantic collections in the background).#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/embedding-model

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
embedding_modelstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/embedding-model" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "embedding_model": "string"
}'

Enables or disables OCR for a tenant (applies to newly indexed documents).#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/ocr

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
enable_ocrboolean

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/ocr" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enable_ocr": false
}'

Sets a tenant's search modes (full-text / semantic), applied to all its collections.#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/search-modes

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
enable_full_text_searchboolean
enable_semantic_searchboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/search-modes" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enable_full_text_search": false,
  "enable_semantic_search": false
}'

Sets a tenant's full-text analyzer folding (case / diacritics); triggers a re-index.#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/analyzer

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
fold_caseboolean
fold_diacriticsboolean
normalize_unicodeboolean
enable_stemmingboolean

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/analyzer" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fold_case": false,
  "fold_diacritics": false,
  "normalize_unicode": false,
  "enable_stemming": false
}'

Rebuilds a tenant's full-text index from the stored page markdown, with no re-ingestion. Runs in the background.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/reindex-fulltext

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/reindex-fulltext" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Starts a tenant-wide semantic rebuild in the background: every document's embedding stamp is cleared and every existing vector row is erased in bounded batches, then the reindex worker re-embeds the corpus from stored page text through the chunk quality gate. Returns 202 immediately; the tenant list reports live progress. Full-text search is unaffected.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/reindex-semantic

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Responses

StatusTypeDescription
202application/json

Accepted

400

Bad Request

401

Unauthorized

404

Not Found

409

Conflict

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/reindex-semantic" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Cancels an in-flight semantic rebuild. The erase stops between batches; documents whose embedding stamp was already cleared still re-embed in the background, so the index stays consistent.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/cancel-reindex-semantic

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/cancel-reindex-semantic" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Updates all of a tenant's indexing settings at once: embedding model, OCR, search modes, and text normalization.#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/config

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)

Request body

application/json ·

PropertyTypeDescription
embedding_modelstring
enable_full_text_searchboolean
enable_semantic_searchboolean
enable_ocrboolean
ocr_noise_rejectionboolean
normalization
rerank_modelstring
query_modelstring
quality_gate_modestring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/config" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "embedding_model": "string",
  "enable_full_text_search": false,
  "enable_semantic_search": false,
  "enable_ocr": false
}'

Gets the Search failed-input capture diagnostics setting (server-wide).#

GET/lmkit/v1/admin/search/failed-input-capture

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/search/failed-input-capture" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Enables or disables Search failed-input capture and sets its directory (server-wide).#

PUT/lmkit/v1/admin/search/failed-input-capture

Request body

application/json ·

PropertyTypeDescription
enabledboolean
directorystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/search/failed-input-capture" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false,
  "directory": "string"
}'

Gets the server-wide semantic quality-gate default (mode and profile) that tenants inherit.#

GET/lmkit/v1/admin/search/quality-gate

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/search/quality-gate" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Sets the server-wide semantic quality-gate default (mode and profile) that tenants inherit.#

PUT/lmkit/v1/admin/search/quality-gate

Request body

application/json ·

PropertyTypeDescription
modestring
profilestring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/search/quality-gate" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "string",
  "profile": "string"
}'

Gets how many documents the Search reindex worker processes in parallel during embedding and full-text rebuilds (server-wide).#

GET/lmkit/v1/admin/search/reindex-parallelism

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/search/reindex-parallelism" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Sets how many documents the Search reindex worker processes in parallel during embedding and full-text rebuilds (server-wide, live).#

PUT/lmkit/v1/admin/search/reindex-parallelism

Request body

application/json ·

PropertyTypeDescription
parallelismobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/search/reindex-parallelism" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "parallelism": "string"
}'

Reports a cluster's database-configuration findings: what the server raised itself, what it adapted around, and what only the platform operator can change (with recommended values).#

GET/lmkit/v1/admin/clusters/search/{clusterId}/database-advisor

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
refreshqueryboolean

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/database-advisor" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Gets the Search ingestion page-size limits (server-wide).#

GET/lmkit/v1/admin/search/ingestion-limits

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/search/ingestion-limits" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Sets the Search ingestion page-size limits (server-wide, live).#

PUT/lmkit/v1/admin/search/ingestion-limits

Request body

application/json ·

PropertyTypeDescription
maxCharsPerPageobject (int32)
maxCharsPerNonPaginatedPageobject (int32)
maxPagesPerDocumentobject (int32)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/search/ingestion-limits" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "maxCharsPerPage": "string",
  "maxCharsPerNonPaginatedPage": "string",
  "maxPagesPerDocument": "string"
}'

Lists one page of a tenant's collections with their indexing settings and reindex progress.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections

Paged: offset/limit bound the returned rows AND the per-collection count queries, so the cost scales with the page size, not the tenant's collection count (limit <= 0 returns everything, the pre-paging behavior). q filters case-insensitively on display name and public id. totalCollections is the tenant's full count, matchingCollections the count matching q.

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)
offsetqueryobject (int32)
limitqueryobject (int32)
qquerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/collections" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the embedding models available in a Search cluster.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/models

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/models" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the reranking models available for the tenant rerank-model setting.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/rerank-models

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/rerank-models" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the query-understanding models available for Search tenants.#

GET/lmkit/v1/admin/clusters/search/{clusterId}/query-models

Parameters

NameInTypeDescription
clusterIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/query-models" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Updates one collection's settings (display name, full-text language).#

PUT/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)
collectionIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
display_namestring
languagesstring[]

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/collections/$COLLECTIONID" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "display_name": "string",
  "languages": [
    "string"
  ]
}'

Deletes a single collection and all of its indexed data (documents, pages, vectors) within a tenant. The tenant and its other collections are untouched. Runs in the background and reports live progress through the collection list.#

DELETE/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)
collectionIdrequiredpathinteger (int64)

Responses

StatusTypeDescription
202application/json

Accepted

401

Unauthorized

404

Not Found

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/collections/$COLLECTIONID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Rebuilds a collection's search index. Semantic: every existing vector row is deleted up front (in the scheduling transaction), then documents re-embed from stored page text through the chunk quality gate. Full-text: regenerated in place, zero downtime.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}/rebuild

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)
collectionIdrequiredpathinteger (int64)

Request body

text/json ·

PropertyTypeDescription
rebuild_semanticboolean
rebuild_full_textboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/collections/$COLLECTIONID/rebuild" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "rebuild_semantic": false,
  "rebuild_full_text": false
}'

Cancels an in-flight collection deletion. The deletion's transaction is rolled back, so the collection and all of its data are left fully intact.#

POST/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}/cancel-delete

Parameters

NameInTypeDescription
clusterIdrequiredpathstring
tenantIdrequiredpathinteger (int64)
collectionIdrequiredpathinteger (int64)

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/clusters/search/$CLUSTERID/tenants/$TENANTID/collections/$COLLECTIONID/cancel-delete" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns all Search clusters with their tenant counts.#

GET/lmkit/v1/admin/collections

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/collections" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Uploads a document for the playground's document chat (admin playground).#

POST/lmkit/v1/admin/playground/doc/upload

Request body

application/x-www-form-urlencoded · object

PropertyTypeDescription
ContentTypestring
ContentDispositionstring
Headersobject
Lengthobject (int64)
Namestring
FileNamestring

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/upload" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/x-www-form-urlencoded"

Fetches a document from a web address into the playground's file store (admin playground).#

POST/lmkit/v1/admin/playground/doc/from-url

The server downloads the document itself, applies the same format and size gates as a direct upload, and returns {fileId, name, size}. The name comes from Content-Disposition, the URL path, or the content type, in that order.

Request body

application/json ·

PropertyTypeDescription
urlstring

Absolute http(s) address of the document to fetch.

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

415

Unsupported Media Type

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/from-url" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "string"
}'

Streams a stored file's content to the playground (admin playground).#

GET/lmkit/v1/admin/playground/files/{fileId}/content

The playground's download path for files chat produced or received: the admin session authorizes it, so no API key is needed. Content-Disposition carries the stored filename.

Parameters

NameInTypeDescription
fileIdrequiredpathstring

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/playground/files/$FILEID/content" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Indexes an uploaded document and opens a chat session over it, narrated as SSE (admin playground).#

POST/lmkit/v1/admin/playground/doc/session

Streams status events while the models prepare and the document indexes (phase: downloading/loading/embedder/indexing with page progress), then a done event with {sessionId, name, pages, tokens, mode, model}.

Request body

application/json ·

PropertyTypeDescription
fileIdstring

The file id returned by the upload endpoint.

modelstring

Chat model id; blank rides the server default.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/session" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fileId": "string",
  "model": "string"
}'

Asks the loaded document a question, streamed with page citations (admin playground).#

POST/lmkit/v1/admin/playground/doc/ask

SSE: status (retrieving/prompt), delta {t: thinking|text, d}, then done {text, model, tokens, rate, prompt_tokens, prompt_secs, gen_secs, reason, ctx, ctx_max, citations: [{page, excerpt, score}]}. Field names follow the native chat done contract. Citations are per page, relevance-ordered.

Request body

application/json ·

PropertyTypeDescription
sessionIdstring

The session id returned by the session endpoint.

questionstring

The question to answer from the document.

requestIdstring

Client-generated id for this exchange, used by skip-thinking.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

429

Too Many Requests

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/ask" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sessionId": "string",
  "question": "string",
  "requestId": "string"
}'

Adds another document to an open session, narrated as SSE (admin playground).#

POST/lmkit/v1/admin/playground/doc/attach

Indexes the file into the existing session so later questions answer across every attached document; citations name the document they came from.

Request body

application/json ·

PropertyTypeDescription
sessionIdstring

The session to add the document to.

fileIdstring

The file id returned by the upload endpoint.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

429

Too Many Requests

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/attach" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sessionId": "string",
  "fileId": "string"
}'

Applies a reviewed redaction proposal to a stored PDF or image (admin playground).#

POST/lmkit/v1/admin/playground/redact/apply

The burn half of human-in-the-loop redaction: pdf_redact_preview proposed the areas, the user reviewed them as marks in the viewer, and this applies exactly those areas. No model is in the loop. PDFs burn through the same operation and stored options as pdf_redact; images burn through the same operation as document_redact, with areas in image pixels. Returns {fileId, name} of the redacted copy; the source is unchanged.

Request body

application/json ·

PropertyTypeDescription
fileIdstring

The file the reviewed proposal targets.

areas[]

The reviewed areas to burn, in page points with a top-left origin.

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/redact/apply" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fileId": "string",
  "areas": [
    {
      "page": "string",
      "left": "string",
      "top": "string",
      "width": "string"
    }
  ]
}'

Reports whether a document session is still resident (admin playground).#

GET/lmkit/v1/admin/playground/doc/state

A liveness probe for the page's warmth indicator. Does NOT refresh the session's idle clock, so asking never keeps a session alive.

Parameters

NameInTypeDescription
sessionIdquerystring

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/state" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Ends the model's thinking phase on a document exchange (admin playground).#

POST/lmkit/v1/admin/playground/doc/skip-thinking

Request body

application/json ·

PropertyTypeDescription
sessionIdstring

The session id returned by the session endpoint.

questionstring

The question to answer from the document.

requestIdstring

Client-generated id for this exchange, used by skip-thinking.

Responses

StatusTypeDescription
202

Accepted

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/skip-thinking" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sessionId": "string",
  "question": "string",
  "requestId": "string"
}'

Closes a playground document session and frees its resources (admin playground).#

DELETE/lmkit/v1/admin/playground/doc/session/{sessionId}

Parameters

NameInTypeDescription
sessionIdrequiredpathstring

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/session/$SESSIONID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Serves an uploaded document's bytes for the playground's viewer (admin playground).#

GET/lmkit/v1/admin/playground/doc/file/{fileId}

Parameters

NameInTypeDescription
fileIdrequiredpathstring

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/file/$FILEID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Renders one page of an uploaded document as an image (admin playground).#

GET/lmkit/v1/admin/playground/doc/thumb/{fileId}

Parameters

NameInTypeDescription
fileIdrequiredpathstring
pagequeryobject (int32)

Zero-based page index.

sizequeryobject (int32)

Longest-side pixel size.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/thumb/$FILEID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Locates a citation's excerpt on its page and returns highlight regions (admin playground).#

POST/lmkit/v1/admin/playground/doc/locate

Fuzzy-matches the excerpt's lead against the page's text layout and returns {pageWidth, pageHeight, rects: [{x, y, w, h}]} in page points with a top-left origin, ready for the viewer's annotation overlay. An empty rects array means the excerpt could not be located (scanned page, heavy reflow).

Request body

application/json ·

PropertyTypeDescription
fileIdstring

The file id of the uploaded document.

pageobject (int32)

1-based page number to search on.

excerptstring

The citation excerpt to locate on the page.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/doc/locate" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fileId": "string",
  "page": "string",
  "excerpt": "string"
}'

Lists server-side directories for the admin panel's folder picker (host sessions only).#

GET/lmkit/v1/admin/fs/directories

Returns {path, parent, dirs, roots} for the given directory, or the file system roots when path is blank. Directory names only, never file contents. Offered only to admin sessions on the server host itself, mirroring the panel's host-only path fields; remote sessions receive 404.

Parameters

NameInTypeDescription
pathquerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/fs/directories" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the Model Context Protocol tool catalog with its exposure state#

GET/lmkit/v1/admin/mcp/catalog

Returns every tool the server can expose over MCP, whether or not it is currently exposed, so the panel can present the full catalog with toggles. Each entry carries the metadata the permission policy and the client's approval prompts are driven by: category, side effect, risk level, and whether the tool is read-only. The 'enabled' flag is evaluated with the same policy the running endpoint applies, so the panel cannot disagree with what clients actually see. Read-only.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/mcp/catalog" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the live Model Context Protocol sessions#

GET/lmkit/v1/admin/mcp/sessions

Returns the sessions currently held by the MCP endpoint, newest activity first: the client name and version reported at initialization, the negotiated protocol version, age, idle time, and the number of tool calls served. Returns an empty list when the endpoint is disabled. Read-only.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/mcp/sessions" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the Model Context Protocol workflows this server defines#

GET/lmkit/v1/admin/mcp/prompts

Returns every workflow with its arguments, the tools it runs, and whether the current tool exposure lets a client be offered it. Clients only ever see the available ones; the panel lists the rest too, naming the missing tools, so an operator can see what offering a hidden workflow would take. Read-only.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/mcp/prompts" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Runs one MCP tool with the supplied arguments, for the catalog's tester (admin).#

POST/lmkit/v1/admin/mcp/tools/invoke

Executes the named tool through the same registry and policy the running endpoint applies and returns its textual content, structured payload, and duration. Only tools the policy exposes run; the call is journaled in the activity log. Trust in a tool comes from running it once.

Request body

application/json ·

PropertyTypeDescription
namestring
argumentsstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/mcp/tools/invoke" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "arguments": "string"
}'

Lists the memory stores with their policies and live usage (admin).#

GET/lmkit/v1/admin/memory/stores

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/memory/stores" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the memory ids filed under a store (admin).#

GET/lmkit/v1/admin/memory/stores/{store}/keys

Parameters

NameInTypeDescription
storerequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/memory/stores/$STORE/keys" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists every fact one memory holds (admin).#

GET/lmkit/v1/admin/memory/stores/{store}/keys/{key}

Loads the memory and enumerates its facts: text, memory type, and the data-source id a deletion targets. Requires the Memory feature (loading rides the embedding model).

Parameters

NameInTypeDescription
storerequiredpathstring
keyrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

409

Conflict

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/memory/stores/$STORE/keys/$KEY" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Forgets one whole memory (admin).#

DELETE/lmkit/v1/admin/memory/stores/{store}/keys/{key}

Parameters

NameInTypeDescription
storerequiredpathstring
keyrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/memory/stores/$STORE/keys/$KEY" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Forgets one fact (admin).#

DELETE/lmkit/v1/admin/memory/stores/{store}/keys/{key}/facts/{factId}

Parameters

NameInTypeDescription
storerequiredpathstring
keyrequiredpathstring
factIdrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/memory/stores/$STORE/keys/$KEY/facts/$FACTID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Merges near-duplicate facts inside one memory (admin).#

POST/lmkit/v1/admin/memory/stores/{store}/keys/{key}/consolidate

Runs the memory engine's consolidation with the server's default chat model: similar facts cluster and merge into consolidated entries. Returns what changed ({clustersMerged, entriesRemoved, entriesCreated, before, after}) and persists the result.

Parameters

NameInTypeDescription
storerequiredpathstring
keyrequiredpathstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

409

Conflict

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/memory/stores/$STORE/keys/$KEY/consolidate" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Imports a model as a custom model, from a server-local file or the Hugging Face hub.#

POST/lmkit/v1/admin/models/import

Registers a servable custom model. With 'path', a GGUF or LMK file already on the server is inspected (architecture, context length, capabilities, embedded license), content-hashed with SHA-256, and added to the registry under the given name. With 'url' (hf.co/owner/repo[:quant]), the repository is resolved through the server's egress policy and the artifacts stream into the content-addressed blob store with hub-declared digests verified while downloading. With 'probe' true, the model is then loaded and exercised (decode, tool round-trip, embeddings) and the measured verdicts recorded; a capability measured broken is refused at request time. Custom models surface beside the catalog on every model listing, marked Unverified.

Request body

application/json ·

PropertyTypeDescription
pathstring

Absolute path of the model file on the server (GGUF or LMK). Mutually exclusive with 'url'.

urlstring

Hugging Face reference to import (hf.co/owner/repo[:quant]). The download rides the server's egress policy and verifies hub-declared digests. Mutually exclusive with 'path'.

probeboolean

When true, the imported model is loaded and exercised (decode, tool round-trip, embeddings) and the measured verdicts are recorded on the record.

namestring

Name the model serves under (name[:tag]). Must not collide with a catalog model or an existing custom model.

aliasesstring[]

Alternate names resolving to the same model.

toolDialectstring

Tool-call dialect override for models whose template fingerprint is unrecognized (a ToolCallingFormat name).

licensestring

License identifier or text recorded with the model.

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/import" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "path": "string",
  "url": "string",
  "probe": false,
  "name": "string"
}'

Runs the dynamic capability probe on a custom model.#

POST/lmkit/v1/admin/models/custom/probe

Loads the model and measures what it actually does: a short decode, a forced tool round-trip, and an embedding pass for embedding-capable models. Verdicts persist on the record; a capability measured broken is refused at request time with the measurement as the reason. Re-run after changing the tool dialect.

Parameters

NameInTypeDescription
namequerystring

The custom model's canonical name. A query parameter because hub-imported names carry slashes.

Responses

StatusTypeDescription
200application/json

OK

404

Not Found

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/custom/probe" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the tool-call dialects a custom model can declare.#

GET/lmkit/v1/admin/models/tool-dialects

The dialect names accepted by the import's toolDialect field, straight from the engine's enum so the admin UI never drifts from it.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/models/tool-dialects" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the custom models the registry serves beside the catalog.#

GET/lmkit/v1/admin/models/custom

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/models/custom" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Removes a custom model from the registry.#

DELETE/lmkit/v1/admin/models/custom

Unloads the model if resident, then removes its registry record. The artifact file stays on disk: imported files are operator-owned. A model actively serving requests is refused.

Parameters

NameInTypeDescription
namequerystring

The custom model's canonical name. A query parameter because hub-imported names carry slashes.

Responses

StatusTypeDescription
200application/json

OK

404

Not Found

409

Conflict

401

Unauthorized

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/models/custom" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Transcribes a recorded audio clip into text (admin playground).#

POST/lmkit/v1/admin/playground/transcribe

Multipart upload of a browser recording (ogg/opus preferred, webm accepted where ffmpeg is available). Runs the server's default speech-to-text model and returns . First use may wait on the speech model downloading or loading.

Request body

application/x-www-form-urlencoded · object

PropertyTypeDescription
ContentTypestring
ContentDispositionstring
Headersobject
Lengthobject (int64)
Namestring
FileNamestring

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/transcribe" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/x-www-form-urlencoded"

Writes a short display title for a playground conversation (admin playground).#

POST/lmkit/v1/admin/playground/title

One cheap greedy completion on the (typically resident) model: at most a few words naming what the first exchange is about. Returns ; an empty title means the caller should keep its fallback.

Request body

application/json ·

PropertyTypeDescription
modelstring

Catalog model ID; blank uses the server's default chat model.

userstring

The conversation's first user message (may be trimmed).

answerstring

The first answer (may be trimmed).

Responses

StatusTypeDescription
200

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/title" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "string",
  "user": "string",
  "answer": "string"
}'

Ends the thinking phase of a running playground exchange; the answer continues (admin playground).#

POST/lmkit/v1/admin/playground/chat/skip-thinking

Addresses the exchange by the request_id it was started with. Delegates to the native chat pipeline's side channel; kept beside the stream route so the playground needs no API key.

Request body

application/json ·

PropertyTypeDescription
request_idstring

The request_id the exchange was started with.

Responses

StatusTypeDescription
202

Accepted

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/chat/skip-thinking" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "request_id": "string"
}'

Streams a chat completion from any catalog model (admin playground).#

POST/lmkit/v1/admin/playground/chat/stream

The native lmkit/v1/chat pipeline behind the playground's admin session: identical event grammar (status, delta, skill, done, error), always streaming. See POST /lmkit/v1/chat for the contract.

Request body

application/json ·

PropertyTypeDescription
modelstring

Catalog model ID; blank uses the server's default chat model.

systemstring

Optional system prompt prepended to the conversation.

messages[]

The conversation so far, ending with the user message to answer. Roles: system, user, assistant.

temperatureobject (float)

Sampling temperature. 0 selects greedy decoding.

top_pobject (float)

Nucleus sampling cutoff: only tokens within this cumulative probability mass are considered. 1 disables the cutoff.

top_kobject (int32)

Top-K sampling cutoff: only the K most likely tokens are considered. Absent keeps the sampler's default.

min_pobject (float)

Minimum probability cutoff relative to the most likely token. Absent keeps the sampler's default.

seedobject (uint32)

Sampling seed for reproducible generation. Absent samples freely.

max_tokensobject (int32)

Upper bound on the completion length, in tokens.

nobject (int32)

How many alternative completions to generate: 1 (default) to 8. Alternatives decode sequentially over one prompt read; with a seed, alternative i samples from seed + i (replay is best-effort, as for any seeded pooled decode). Not combinable with tools or model-driven skills. Streaming deltas carry the alternative's index as 'i', and the terminal summary lists every alternative under 'choices'.

logprobsboolean

true returns the log probability of every generated token (thinking and tool channels included, in generation order) on the terminal summary.

top_logprobsobject (int32)

0 to 20: how many of the most likely alternatives to report at each position. A positive value implies logprobs.

logit_biasobject

Per-token sampling bias, -100 (never) to 100 (always): keys are token ids ("8264") or plain text chunks ("Paris"), which the server maps onto the model's own vocabulary. The bias adds to the token's raw logit at every position.

stopstring[]

Sequences that end the completion when generated. The matched sequence is not included in the answer.

frequency_penaltyobject (float)

Penalizes tokens by how often they already appeared, reducing repetition. 0 disables.

presence_penaltyobject (float)

Penalizes tokens that appeared at all, encouraging new topics. 0 disables.

repeat_penaltyobject (float)

Multiplicative repetition penalty over recent tokens. Absent keeps the sampler's default.

reasoningstring

Reasoning effort for models with a thinking channel: none, low, medium, or high. 'none' disables thinking; absent keeps the model's default.

response_format

Constrains the answer's shape: {type: 'text' | 'json_object'} or {type: 'json_schema', json_schema: {schema: }}. JSON modes are grammar-enforced during decoding, so a non-conforming answer cannot be produced.

tools[]

Client-dispatched tools the model may call: name, description, and a JSON Schema for the arguments. A call ends the exchange with reason 'tool_calls'; send each result back as a 'tool' role message to continue.

server_toolsstring[]

Server-executed built-in tools the model may use, by name (e.g. web_search, calc_arithmetic): the server runs the tool and the exchange continues with its result. Only tools the server's Tools policy enables actually run; anything else is narrated as denied. Tool use streams as tool_use events and is summarized on the result as tool_events.

tool_choiceone of object ·
streamboolean

true streams server-sent events (status, delta, skill, done, error); false returns one JSON result.

request_idstring

Optional caller-generated identifier for this exchange, used to address it from side channels (e.g. skip-thinking).

skillstring

Optional name of a server skill pinned for this exchange: its instructions ride the system turn.

skillsstring[]

Server skill names the model may discover and activate on its own through function calling. Empty or absent disables model-driven skills for this exchange.

skill_inputsobject

Answers to the pinned skill's activation questions, keyed by each question's slug. Unanswered questions fall back to their declared defaults.

memorystring

Optional agent-memory id: facts extracted from this exchange persist on the server under this id, and facts stored earlier under it are recalled as hidden context. Requires the server's Memory feature; when it is off the exchange proceeds without memory. Letters, digits, dash, and underscore.

memory_storestring

Optional name of the memory STORE the memory id lives under: a server-defined policy bundle (recall depth, capacity, eviction, decay, extraction behavior). Absent uses the agent's store when an agent rides the request, else the default store.

agentstring

Optional name of a server-defined agent: a reusable bundle (system prompt, skill, tools, memory intent) this exchange adopts. The bundle supplies defaults; any field the request states explicitly wins. A memory-intent bundle defaults 'memory' to the agent's own shared store, so the agent remembers across conversations unless the request scopes recall itself. An unknown name is a named refusal.

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/chat/stream" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "string",
  "system": "string",
  "messages": [
    {
      "role": "string",
      "content": "string",
      "images": [
        "string"
      ],
      "files": [
        {}
      ]
    }
  ],
  "temperature": "string"
}'

Returns the live setup state: capability states, detected active uses, security posture summary, hardware, and MCP connection material.#

GET/lmkit/v1/admin/setup/state

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/setup/state" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Dry-runs a setup path: returns every configuration change it would make in plain words, with warnings, blocking issues, and restart consequences. Changes nothing.#

POST/lmkit/v1/admin/setup/plan

Request body

application/json ·

PropertyTypeDescription
recipestring
answers
planDigeststring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/setup/plan" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "recipe": "string",
  "answers": {
    "networkAccess": "string",
    "confirmExposure": false,
    "ssoAuthority": "string",
    "ssoClientId": "string"
  },
  "planDigest": "string"
}'

Applies a setup path. Re-plans from the submitted answers against the current configuration, refuses blocked plans, and writes through the same configuration pipeline as the admin form.#

POST/lmkit/v1/admin/setup/apply

Request body

application/json ·

PropertyTypeDescription
recipestring
answers
planDigeststring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/setup/apply" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "recipe": "string",
  "answers": {
    "networkAccess": "string",
    "confirmExposure": false,
    "ssoAuthority": "string",
    "ssoClientId": "string"
  },
  "planDigest": "string"
}'

Verifies a setup path against live state: every check re-reads current configuration and runtime, so the result is honest after restarts and manual edits alike.#

POST/lmkit/v1/admin/setup/verify

Request body

application/json ·

PropertyTypeDescription
recipestring
answers
planDigeststring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/setup/verify" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "recipe": "string",
  "answers": {
    "networkAccess": "string",
    "confirmExposure": false,
    "ssoAuthority": "string",
    "ssoClientId": "string"
  },
  "planDigest": "string"
}'

Lists the server's Agent Skills for the playground picker.#

GET/lmkit/v1/admin/playground/skills

Returns {enabled, skills:[{name, description, version, mode, manualOnly, resources}]}. 'manualOnly' skills can be pinned by the user but are never offered to the model for self-activation. Reports with an empty list while skills are turned off, so the picker can render its disabled state.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/playground/skills" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the server's Agent Skills with their folders, validation issues, and load failures (admin).#

GET/lmkit/v1/admin/skills/catalog

The admin panel's skills inventory: every loaded skill with its folder and any specification issues, plus the folders whose SKILL.md failed to parse. The directory is the configured skills root, resolved to an absolute path.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/skills/catalog" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Returns one skill's full content for the admin editor (admin).#

GET/lmkit/v1/admin/skills/skill

The editable fields: description, the SKILL.md instruction body, and the manual-only flag, plus the read-only version and folder.

Parameters

NameInTypeDescription
namequerystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/skills/skill" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Installs a skill from a URL: a SKILL.md, a ZIP of skill folders, or a GitHub tree URL (admin).#

POST/lmkit/v1/admin/skills/install-url

Fetches the skill, copies it into the skills directory, and registers it immediately. Existing names are never overwritten.

Request body

application/json ·

PropertyTypeDescription
urlstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/install-url" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "string"
}'

Adds a reference file to a skill (admin).#

POST/lmkit/v1/admin/skills/resources/add

Uploads one text reference into the skill's references folder; the model loads it on demand when the skill is active. Text formats only, capped in size.

Request body

application/x-www-form-urlencoded · object

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/resources/add" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/x-www-form-urlencoded"

Removes a reference file from a skill (admin).#

POST/lmkit/v1/admin/skills/resources/delete

Request body

application/json ·

PropertyTypeDescription
namestring
pathstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/resources/delete" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "path": "string"
}'

Creates a new skill from the admin editor (admin).#

POST/lmkit/v1/admin/skills/create

Writes a SKILL.md folder named after the skill into the skills directory and registers it immediately. The name must be lowercase letters, digits, and hyphens.

Request body

application/json ·

PropertyTypeDescription
namestring
descriptionstring
instructionsstring
manualOnlyboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

409

Conflict

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/create" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "instructions": "string",
  "manualOnly": false
}'

Rewrites an existing skill from the admin editor (admin).#

POST/lmkit/v1/admin/skills/update

Updates the skill's SKILL.md in place, preserving version, license, and mode fields, and re-registers it immediately.

Request body

application/json ·

PropertyTypeDescription
namestring
descriptionstring
instructionsstring
manualOnlyboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/update" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "instructions": "string",
  "manualOnly": false
}'

Deletes a skill's folder from the skills directory (admin).#

POST/lmkit/v1/admin/skills/delete

Removes the folder and unregisters the skill. Refuses folders outside the configured skills directory.

Request body

application/json ·

PropertyTypeDescription
namestring
descriptionstring
instructionsstring
manualOnlyboolean

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/delete" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "instructions": "string",
  "manualOnly": false
}'

Drafts a skill's instruction body with the server's default chat model (admin).#

POST/lmkit/v1/admin/skills/draft

One completion on the default chat model turns the skill's name and description into a Markdown instruction body for the editor. First use may wait on the model downloading or loading.

Request body

application/json ·

PropertyTypeDescription
namestring
descriptionstring
audiencestring
tonestring
formatstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/draft" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "audience": "string",
  "tone": "string"
}'

Lists the predefined skill library with each entry's installed state (admin).#

GET/lmkit/v1/admin/skills/predefined

The curated skills the panel offers for one-click install: name, description, and whether a skill with that name is already registered.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/skills/predefined" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Installs predefined library skills into the skills directory (admin).#

POST/lmkit/v1/admin/skills/install

Writes each named library skill as a SKILL.md folder and registers it immediately. Names already registered are reported as skipped rather than overwritten.

Request body

application/json ·

PropertyTypeDescription
namesstring[]

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/skills/install" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "names": [
    "string"
  ]
}'

Reports whether single sign-on is offered, for the sign-in form.#

GET/lmkit/v1/admin/sso/status

Anonymous by design: the sign-in form must know what to render before any credential exists. Returns {enabled, provider, passwordLogin}; nothing about the provider's configuration leaks beyond its display name.

Responses

StatusTypeDescription
200application/json

OK

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/sso/status" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Probes an identity provider's discovery document (admin).#

POST/lmkit/v1/admin/sso/test

Fetches /.well-known/openid-configuration for the authority in the body (falling back to the saved one), so an operator proves the provider answers BEFORE trusting it as the only door. Reports the issuer and which endpoints it names; nothing is signed in and nothing is saved.

Request body

text/json ·

PropertyTypeDescription
authoritystring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/sso/test" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "authority": "string"
}'

Starts the single sign-on flow by redirecting to the identity provider.#

GET/lmkit/v1/admin/sso/challenge

Stores a single-use, process-local challenge (state, nonce, PKCE verifier, destination) and redirects to the provider's authorization endpoint. 'return' names the same-site path to land on afterwards; anything else falls back to the root.

Parameters

NameInTypeDescription
returnquerystring

Responses

StatusTypeDescription
302

Found

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/sso/challenge" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Finishes the single sign-on flow and hands the session to the page.#

GET/lmkit/v1/admin/sso/callback

The redirect URI registered at the provider. Validates the identity token against the provider's keys and the stored challenge, applies the domain and group filters, then mints the same process-local session a password sign-in gets.

Parameters

NameInTypeDescription
codequerystring
statequerystring
errorquerystring
error_descriptionquerystring

Responses

StatusTypeDescription
302

Found

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/sso/callback" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the server-executed tools offered to the playground chat.#

GET/lmkit/v1/admin/playground/tools

Returns {enabled, tools:[{name, description}]}: the curated built-in tools the server's Tools policy currently offers. Reports with an empty list while tools are turned off, so the composer can render its disabled state.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/playground/tools" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Turns on named server tools from the playground (admin).#

POST/lmkit/v1/admin/playground/tools/enable

Allows the named tools, switching tools on server-wide when they were off entirely, and optionally adds one ingest folder for the disk-facing file tools. Returns {turnedOn, still, agents}: what the policy now offers, what still cannot run and why, and the refreshed agent list.

Request body

text/json ·

PropertyTypeDescription
toolsstring[]
ingestRootstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/tools/enable" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tools": [
    "string"
  ],
  "ingestRoot": "string"
}'

Updates a named agent's instruction (admin).#

POST/lmkit/v1/admin/playground/agents/instructions

Replaces the agent's system instruction and persists it. Returns {success, agents}: the refreshed agent list as the playground renders it. The instruction cannot be emptied from here; removing it entirely is an admin-panel decision.

Request body

text/json ·

PropertyTypeDescription
namestring
systemstring

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/playground/agents/instructions" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "system": "string"
}'

Returns a recent turn's full engine transcript as plain text (playground diagnostics).#

GET/lmkit/v1/admin/playground/turn-context/{id}

The engine-eye dump of one turn: every token the engine decoded, special markers kept (system prompt, chat template, tool definitions, history, generation). Fetched by the kv_id handle the turn's done event carried. Transcripts are held briefly and bounded; an expired handle returns 404.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

StatusTypeDescription
200text/plain

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/playground/turn-context/$ID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Requests per agent over the last seven days, from the persisted audit trail.#

GET/lmkit/v1/admin/agents/usage

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/agents/usage" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists the server-executed tool catalog with each tool's live enabled state (admin).#

GET/lmkit/v1/admin/tools/catalog

The admin panel's tools inventory: every tool the server exposes for server-side execution, with its description, display group, and whether the current policy offers it. Curated safe computation, web search, allowlisted HTTP, and the server's own document tools (file access limited to the configured ingest roots); nothing reaching arbitrary disk paths or processes is exposed at all.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/tools/catalog" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Checks whether a SearXNG instance answers the JSON API the web-search tool uses (admin).#

POST/lmkit/v1/admin/tools/websearch-check

Returns {state, detail}: state is ok, empty, invalid, unreachable, json-disabled, or error, and detail is the sentence the panel shows. Never throws on a bad address; an unreachable instance is a result, not an error.

Request body

text/json ·

PropertyTypeDescription
baseUrlstring

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/tools/websearch-check" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "baseUrl": "string"
}'

Reports every MCP connector's live status: connection outcome and discovered tools (admin).#

GET/lmkit/v1/admin/connectors/status

Connectors are protocol servers THIS server connects to as a client; their tools join the server-executed tools chat can use, qualified as connector/tool. Probing connects the enabled ones, so this reflects reality rather than configuration.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/connectors/status" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists all training jobs, newest first (admin).#

GET/lmkit/v1/admin/training/jobs

Responses

StatusTypeDescription
200[]

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Starts a LoRA fine-tuning job (admin).#

POST/lmkit/v1/admin/training/jobs

Request body

application/json ·

PropertyTypeDescription
modelstring

Identifier of the base model to fine-tune. If omitted, the default chat model is used.

stagestring

Training stage: 'sft' (default) fine-tunes on chat conversations with the chat template applied; 'pretrain' continues pre-training on raw text (assistant-only masking does not apply).

raw_textstring

Raw training text for the 'pretrain' stage. Combined with any uploaded dataset file.

dataset[]

Inline training samples as conversations. Each item is a list of role/content messages; assistant turns are supervised. Provide this or dataset_file_id.

dataset_file_idstring

File id (from /lmkit/v1/files/upload) of a dataset to train on: JSONL chat, ShareGPT, Alpaca, plain text, or a ZIP archive of these. Format is auto-detected. Provide this or dataset.

rankobject (int32)

LoRA rank (inner dimension of the adapter). Higher adds capacity and size. Default 8.

alphaobject (float)

LoRA alpha scaling factor. Effective scale is alpha/rank. Default 16.

target_modulesstring

Which modules receive adapters: 'attention' (default), 'attention_and_feedforward', or 'all'.

epochsobject (int32)

Number of passes over the training set. Default 3.

learning_rateobject (float)

Initial AdamW learning rate. Default 1e-4.

gradient_accumulationobject (int32)

Samples accumulated per optimizer step: gradients combine across this many samples before the weights update, multiplying the effective batch size at flat memory. 1 steps on every sample.

use_rsloraboolean

Rank-stabilized LoRA: scales the adapter by alpha/sqrt(rank) instead of alpha/rank, keeping higher ranks trainable. The scaling folds into the saved artifact.

lr_schedulestring

Learning-rate schedule: 'cosine' (default), 'constant', 'linear', 'cosine_with_restarts', or 'polynomial'.

weight_decayobject (float)

AdamW weight decay.

max_grad_normobject (float)

Gradient clipping by global norm before each optimizer step. Default 1.0; 0 disables clipping.

min_learning_rateobject (float)

Floor the decaying schedules approach. Ignored by the constant schedule.

warmup_ratioobject (float)

Fraction of steps spent warming the learning rate up from zero. Default 0.

validation_splitobject (float)

Fraction of samples held out for per-epoch validation. Default 0.05.

assistant_loss_onlyboolean

Compute loss only on assistant tokens (standard for instruction tuning). Default true.

sequence_packingboolean

Pack consecutive short samples into shared training windows. Loss never crosses a sample boundary; image samples are never packed. Default false.

seedobject (uint32)

Seed for reproducible adapter initialization. 0 means non-deterministic.

cutoff_lengthobject (int32)

Maximum tokens per training sequence (the training window). Samples longer than this are skipped, and every sample is padded to it during packing. 0 (the default) sizes the window to the longest sample.

checkpoint_stepsobject (int32)

Save a training checkpoint (adapter weights + optimizer state) every N optimizer steps, enabling resume. 0 disables checkpointing.

early_stopping_patienceobject (int32)

Stop the run after this many validation passes without improvement, keeping everything trained so far. Requires a validation split. 0 disables early stopping.

artifact_from_bestboolean

Produce the artifact from the weights at the BEST validation loss instead of the last step: the run snapshots the adapter whenever validation improves. Requires a validation split.

micro_batchobject (int32)

Tokens evaluated per training micro-batch. Smaller values cut activation memory linearly; larger values run faster when memory allows. 0 (the default) picks 512 or 256 to divide the window.

lora_plus_ratioobject (float)

LoRA+ learning-rate ratio: the zero-initialized B matrices train at this multiple of the base learning rate, which speeds convergence at unchanged memory. 16 is the common value; 0 (the default) trains both sides at the base rate.

neftune_alphaobject (float)

NEFTune noise alpha: training adds uniform noise scaled by alpha over sqrt(tokens x embedding width) onto the input embeddings, a regularizer that counters overfitting on small datasets. Validation always runs without noise. 5 is the paper's default; 0 (the default) disables it.

first_layerobject (int32)

First transformer block that receives adapters, inclusive. 0 (the default) starts at the first block. Restricting the range cuts adapter memory and backward compute proportionally.

last_layerobject (int32)

Last transformer block that receives adapters, inclusive. 0 (the default) extends to the last block.

full_precisionboolean

Train from the model's full-precision (F16/BF16) variant when its repository publishes one, downloading it on first use. Ignored for custom paths and models with no published variant.

merge_quantizationstring

For merged-model output: quantize the merged GGUF to this precision (q4_k_m, q5_k_m, or q8_0). Empty keeps the merge at the base's precision. Ignored for adapter output.

outputstring

Artifact to produce: 'adapter' (default, a small LoRA GGUF) or 'model' (base merged with the adapter).

Responses

StatusTypeDescription
202

Accepted

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "",
  "stage": "string",
  "raw_text": "string",
  "dataset": [
    {
      "messages": [
        {
          "role": "...",
          "content": "..."
        }
      ]
    }
  ]
}'

Uploads a dataset file for training (admin).#

POST/lmkit/v1/admin/training/dataset

Accepts JSONL chat, ShareGPT JSON, Alpaca JSON, plain text, or a ZIP archive of these. Returns a dataset_file_id to pass to the start endpoint.

Request body

multipart/form-data · object

PropertyTypeDescription
file

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/dataset" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: multipart/form-data"

Requests cancellation of a training job (admin).#

POST/lmkit/v1/admin/training/jobs/{jobId}/cancel

Training halts after the current batch; the partially-trained adapter is still saved.

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The training job identifier.

Responses

StatusTypeDescription
200

OK

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID/cancel" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Reports whether a catalog model publishes a full-precision variant (admin).#

GET/lmkit/v1/admin/training/precision

The training form offers full-precision training only when the model's repository actually carries an F16/BF16 sibling; this resolves and caches that fact.

Parameters

NameInTypeDescription
modelquerystring

The catalog model ID to resolve.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/training/precision" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Prices a training configuration against this machine (admin).#

POST/lmkit/v1/admin/training/preflight

Coarse device-memory estimate for base weights, adapter train state, and compute buffers, so a run that cannot fit fails in the form instead of after a download.

Request body

application/json ·

PropertyTypeDescription
modelstring

Catalog model ID; blank prices the server's default chat model.

rankobject (int32)
target_modulesstring
full_precisionboolean

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/preflight" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "string",
  "rank": "string",
  "target_modules": "string",
  "full_precision": false
}'

Chats with a finished training job's artifact (admin).#

POST/lmkit/v1/admin/training/jobs/{jobId}/chat

Loads the job's merged model, or a private copy of its base with the adapter applied, and answers the trailing user message. For judging a fine-tune before downloading it; the tryout model is released after idling.

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The training job identifier.

Request body

application/json ·

PropertyTypeDescription
messages[]

The conversation so far, ending with the user message to answer. Roles: system, user, assistant.

max_tokensobject (int32)

Upper bound on the completion length, in tokens.

Responses

StatusTypeDescription
200application/json

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID/chat" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "messages": [
    {
      "role": "string",
      "content": "string"
    }
  ],
  "max_tokens": "string"
}'

Token statistics for a training set before any run (admin).#

POST/lmkit/v1/admin/training/dataset/stats

Tokenizes the staged dataset with the selected base model's tokenizer (weights stay on disk) and reports sample counts, token-length extremes, and how many samples a given cutoff would skip. Requires the model to be available locally; the response says so when it is not.

Request body

application/json ·

PropertyTypeDescription
modelstring

Identifier of the base model to fine-tune. If omitted, the default chat model is used.

stagestring

Training stage: 'sft' (default) fine-tunes on chat conversations with the chat template applied; 'pretrain' continues pre-training on raw text (assistant-only masking does not apply).

raw_textstring

Raw training text for the 'pretrain' stage. Combined with any uploaded dataset file.

dataset[]

Inline training samples as conversations. Each item is a list of role/content messages; assistant turns are supervised. Provide this or dataset_file_id.

dataset_file_idstring

File id (from /lmkit/v1/files/upload) of a dataset to train on: JSONL chat, ShareGPT, Alpaca, plain text, or a ZIP archive of these. Format is auto-detected. Provide this or dataset.

rankobject (int32)

LoRA rank (inner dimension of the adapter). Higher adds capacity and size. Default 8.

alphaobject (float)

LoRA alpha scaling factor. Effective scale is alpha/rank. Default 16.

target_modulesstring

Which modules receive adapters: 'attention' (default), 'attention_and_feedforward', or 'all'.

epochsobject (int32)

Number of passes over the training set. Default 3.

learning_rateobject (float)

Initial AdamW learning rate. Default 1e-4.

gradient_accumulationobject (int32)

Samples accumulated per optimizer step: gradients combine across this many samples before the weights update, multiplying the effective batch size at flat memory. 1 steps on every sample.

use_rsloraboolean

Rank-stabilized LoRA: scales the adapter by alpha/sqrt(rank) instead of alpha/rank, keeping higher ranks trainable. The scaling folds into the saved artifact.

lr_schedulestring

Learning-rate schedule: 'cosine' (default), 'constant', 'linear', 'cosine_with_restarts', or 'polynomial'.

weight_decayobject (float)

AdamW weight decay.

max_grad_normobject (float)

Gradient clipping by global norm before each optimizer step. Default 1.0; 0 disables clipping.

min_learning_rateobject (float)

Floor the decaying schedules approach. Ignored by the constant schedule.

warmup_ratioobject (float)

Fraction of steps spent warming the learning rate up from zero. Default 0.

validation_splitobject (float)

Fraction of samples held out for per-epoch validation. Default 0.05.

assistant_loss_onlyboolean

Compute loss only on assistant tokens (standard for instruction tuning). Default true.

sequence_packingboolean

Pack consecutive short samples into shared training windows. Loss never crosses a sample boundary; image samples are never packed. Default false.

seedobject (uint32)

Seed for reproducible adapter initialization. 0 means non-deterministic.

cutoff_lengthobject (int32)

Maximum tokens per training sequence (the training window). Samples longer than this are skipped, and every sample is padded to it during packing. 0 (the default) sizes the window to the longest sample.

checkpoint_stepsobject (int32)

Save a training checkpoint (adapter weights + optimizer state) every N optimizer steps, enabling resume. 0 disables checkpointing.

early_stopping_patienceobject (int32)

Stop the run after this many validation passes without improvement, keeping everything trained so far. Requires a validation split. 0 disables early stopping.

artifact_from_bestboolean

Produce the artifact from the weights at the BEST validation loss instead of the last step: the run snapshots the adapter whenever validation improves. Requires a validation split.

micro_batchobject (int32)

Tokens evaluated per training micro-batch. Smaller values cut activation memory linearly; larger values run faster when memory allows. 0 (the default) picks 512 or 256 to divide the window.

lora_plus_ratioobject (float)

LoRA+ learning-rate ratio: the zero-initialized B matrices train at this multiple of the base learning rate, which speeds convergence at unchanged memory. 16 is the common value; 0 (the default) trains both sides at the base rate.

neftune_alphaobject (float)

NEFTune noise alpha: training adds uniform noise scaled by alpha over sqrt(tokens x embedding width) onto the input embeddings, a regularizer that counters overfitting on small datasets. Validation always runs without noise. 5 is the paper's default; 0 (the default) disables it.

first_layerobject (int32)

First transformer block that receives adapters, inclusive. 0 (the default) starts at the first block. Restricting the range cuts adapter memory and backward compute proportionally.

last_layerobject (int32)

Last transformer block that receives adapters, inclusive. 0 (the default) extends to the last block.

full_precisionboolean

Train from the model's full-precision (F16/BF16) variant when its repository publishes one, downloading it on first use. Ignored for custom paths and models with no published variant.

merge_quantizationstring

For merged-model output: quantize the merged GGUF to this precision (q4_k_m, q5_k_m, or q8_0). Empty keeps the merge at the base's precision. Ignored for adapter output.

outputstring

Artifact to produce: 'adapter' (default, a small LoRA GGUF) or 'model' (base merged with the adapter).

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/dataset/stats" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "",
  "stage": "string",
  "raw_text": "string",
  "dataset": [
    {
      "messages": [
        {
          "role": "...",
          "content": "..."
        }
      ]
    }
  ]
}'

Deletes a finished training job and every file it produced (admin).#

DELETE/lmkit/v1/admin/training/jobs/{jobId}

Removes the job's record, artifact, checkpoints, and materialized dataset. A running job must be stopped first.

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The training job identifier.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

409

Conflict

curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Lists a training job's saved checkpoints (admin).#

GET/lmkit/v1/admin/training/jobs/{jobId}/checkpoints

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The training job identifier.

Responses

StatusTypeDescription
200application/json

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID/checkpoints" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Downloads the adapter snapshot of one checkpoint (admin).#

GET/lmkit/v1/admin/training/jobs/{jobId}/checkpoints/{step}/adapter

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The training job identifier.

steprequiredpathobject (int64)

The checkpoint's optimizer step.

Responses

StatusTypeDescription
200application/octet-stream

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID/checkpoints/$STEP/adapter" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Resumes training from a job's checkpoint (admin).#

POST/lmkit/v1/admin/training/jobs/{jobId}/resume

Starts a NEW job continuing the source job's dataset and hyperparameters from the given checkpoint (or the latest when no step is passed): optimizer state and adapter weights are restored, and training continues to the original epoch target.

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The source training job identifier.

stepqueryobject (int64)

Checkpoint step to resume from; the latest checkpoint when omitted.

Responses

StatusTypeDescription
202

Accepted

400

Bad Request

401

Unauthorized

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID/resume" \
  -H "Authorization: Bearer $LMKIT_API_KEY"

Streams a chat completion from a finished training job's artifact (admin).#

POST/lmkit/v1/admin/training/jobs/{jobId}/chat/stream

Server-sent events: 'delta' events carry {t: 'thinking'|'text', d: fragment} as the model decodes, then one 'done' event with the full visible answer.

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The training job identifier.

Request body

application/json ·

PropertyTypeDescription
messages[]

The conversation so far, ending with the user message to answer. Roles: system, user, assistant.

max_tokensobject (int32)

Upper bound on the completion length, in tokens.

Responses

StatusTypeDescription
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID/chat/stream" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "messages": [
    {
      "role": "string",
      "content": "string"
    }
  ],
  "max_tokens": "string"
}'

Downloads a training job's GGUF artifact (admin).#

GET/lmkit/v1/admin/training/jobs/{jobId}/artifact

Parameters

NameInTypeDescription
jobIdrequiredpathstring

The training job identifier.

Responses

StatusTypeDescription
200application/octet-stream

OK

401

Unauthorized

404

Not Found

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/training/jobs/$JOBID/artifact" \
  -H "Authorization: Bearer $LMKIT_API_KEY"