Administration
Authenticates an operator and returns a session token.#
/lmkit/v1/admin/loginVerifies 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 ·
| Property | Type | Description |
|---|---|---|
username | string | |
password | string | |
totpCode | string | |
newPassword | string | |
remember | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/sessionsEvery 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/sessions/revokeRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
id | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/sessions/revoke-othersResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/logoutResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/area-ticketAdmin-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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/2fa/statusResponses
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/2fa/setupGenerates 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
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/2fa/enableRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
code | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/2fa/disableRequires a valid current authentication code so that a hijacked session alone cannot strip the second factor.
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
code | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/configurationReturns 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
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/configuration" \
-H "Authorization: Bearer $LMKIT_API_KEY"Updates server configuration.#
/lmkit/v1/admin/configurationAccepts 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 ·
| Property | Type | Description |
|---|---|---|
general | one of object · | |
models | one of object · | |
ocr | one of object · | |
documentSigning | one of object · | |
hardware | one of object · | |
fileManagement | one of object · | |
inference | one of object · | |
security | one of object · | |
telemetry | one of object · | |
mcp | one of object · | |
webAreas | one of object · | |
skills | one of object · | |
sso | one of object · | |
tools | one of object · | |
ports | one of object · | |
domainRevisions | object | |
connectors | [] | |
memory | one of object · | |
agents | [] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 409 | Conflict |
curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/configuration" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domainRevisions": {},
"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.#
/lmkit/v1/admin/ffmpeg/statusProbes 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/ffmpeg/downloadStarts 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
| Status | Type | Description |
|---|---|---|
| 202 | application/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.#
/lmkit/v1/admin/ffmpeg/managedDeletes 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/ffmpeg/testExercises 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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#
/lmkit/v1/admin/inference/slot-pool-fitReports 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
| Name | In | Type | Description |
|---|---|---|---|
slots | query | object (int32) | |
slotContextSize | query | object (int32) | |
memoryRatio | query | object (double) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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#
/lmkit/v1/admin/inference/slot-pool-fitSame 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 ·
| Property | Type | Description |
|---|---|---|
slots | object (int32) | |
slotContextSize | object (int32) | |
memoryRatio | object (double) | |
modelOverrides | [] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/contextsLists 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
| Name | In | Type | Description |
|---|---|---|---|
uri | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/hibernateSchedules 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 ·
| Property | Type | Description |
|---|---|---|
modelUri | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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 the served models grouped by capability.#
/lmkit/v1/admin/modelsReturns the models this server serves, organized by server role: the non-legacy models of the LM-Kit catalog and the custom models imported beside it, the latter flagged 'custom'. This is the list every model picker of the admin panel reads, so a custom import is offered in every default slot its capabilities can serve. Requires the X-Admin-Password header when an admin password is configured.
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/models" \
-H "Authorization: Bearer $LMKIT_API_KEY"Returns available GPU devices.#
/lmkit/v1/admin/devicesResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/dashboard/liveExcludes 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/memory/diagnosticsAggregates 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/memory/gc-collectForces 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/memory/trimOn 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/memory/clear-cachesDrops 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/dashboard/snapshotIntended for on-demand refresh; not for high-frequency polling.
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/dashboardParameters
| Name | In | Type | Description |
|---|---|---|---|
logLines | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/files/cleanupResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/files/cleanup" \
-H "Authorization: Bearer $LMKIT_API_KEY"Returns the live OpenTelemetry instruments discovered from the watched meters: per instrument the kind, unit, description, counts, sum, min, max, last value, histogram buckets and the trailing-minute p95, plus how many tag sets it carries. The per-tag-set breakdown travels only for the instrument named by <c>focus</c> (meter::name), which is what keeps a one-second refresh cheap. The envelope also carries the durable history's facts (retention, cadence, size on disk, oldest sample) and the export state (Prometheus scrape endpoint and last scrape, OTLP endpoint).#
/lmkit/v1/admin/telemetry/statusParameters
| Name | In | Type | Description |
|---|---|---|---|
focus | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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 1 Hz, the same envelope as GET telemetry/status; <c>focus</c> names the one instrument (meter::name) whose per-tag-set breakdown travels with every frame.#
/lmkit/v1/admin/telemetry/streamParameters
| Name | In | Type | Description |
|---|---|---|---|
focus | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/alerts/historyParameters
| Name | In | Type | Description |
|---|---|---|---|
count | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/alerts/historyResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/alerts/dismissResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/diagnostics/restart-reportResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/diagnostics/restart-historyParameters
| Name | In | Type | Description |
|---|---|---|---|
count | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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. A report id another node minted answers 421 naming that node.#
/lmkit/v1/admin/diagnostics/restart-report/acknowledgeRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
id | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 421 | Misdirected Request |
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.#
/lmkit/v1/admin/audit/historyParameters
| Name | In | Type | Description |
|---|---|---|---|
since | query | string | |
minLevel | query | string | |
source | query | string | |
limit | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/audit/exportParameters
| Name | In | Type | Description |
|---|---|---|---|
since | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/disk-usageResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/processesParameters
| Name | In | Type | Description |
|---|---|---|---|
top | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/metrics/latencyResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/metrics/endpointsResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/metrics/history/resetResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/metrics/history/reset" \
-H "Authorization: Bearer $LMKIT_API_KEY"Returns the in-memory per-instrument time-series (up to 1 hour at 1 Hz), which the Metrics page uses to seed its live charts so a freshly opened page shows the history the server already holds. <c>instrument</c> (meter::name) restricts the answer to one instrument; <c>tags</c> adds the per-tag-set series, which only the selected instrument's breakdown needs.#
/lmkit/v1/admin/telemetry/historyParameters
| Name | In | Type | Description |
|---|---|---|---|
count | query | object (int32) | |
instrument | query | string | |
tags | query | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/telemetry/seriesParameters
| Name | In | Type | Description |
|---|---|---|---|
instrument | query | string | |
window | query | object (int32) | |
points | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/telemetry/resetResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/metrics/historyParameters
| Name | In | Type | Description |
|---|---|---|---|
count | query | object (int32) | |
stride | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/metrics/statsParameters
| Name | In | Type | Description |
|---|---|---|---|
count | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/ocr/statusResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/inferences/activeResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/requests/activeResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/queue/activeResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/jobs/activeResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/jobs/{id}/cancelParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 421 | Misdirected Request |
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.#
/lmkit/v1/admin/apikeysResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeysRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
name | string | |
scope | string | |
expiresInDays | object (int32) | |
clusterGrants | string[] | |
allClusters | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}/revokeParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}/restoreParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}/regenerateParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}/renameParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
name | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}/tool-grantsParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
grants | string[] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}/cluster-grantsParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
grants | string[] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}/search-accessParameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/apikeys/{id}Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/stream-ticketEventSource 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 ·
| Property | Type | Description |
|---|---|---|
purpose | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/eventsResponses
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/security/auditResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/security/admin-passwordWhile 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 ·
| Property | Type | Description |
|---|---|---|
newPassword | string | |
currentPassword | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/security/operatorsResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/security/operatorsAdds 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 ·
| Property | Type | Description |
|---|---|---|
username | string | |
displayName | string | |
email | string | |
role | string | |
password | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/security/meWho 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/security/operators/{id}Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer (int64) |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
displayName | string | |
email | string | |
role | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/security/operators/{id}/enabledDisabling 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer (int64) |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
enabled | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/security/operators/{id}/reset-passwordAssigns 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer (int64) |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
newPassword | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/tls/infoResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/tls/certificateRequest body
application/x-www-form-urlencoded · object
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 409 | Conflict |
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.#
/lmkit/v1/admin/tls/certificateResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 409 | Conflict |
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.#
/lmkit/v1/admin/tls/acmeResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/tls/acmeRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
enabled | boolean | |
domainNames | string[] | |
emailAddress | string | |
acceptTermsOfService | boolean | |
useStagingServer | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/scheduler/jobsResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/scheduler/jobs/{name}/runParameters
| Name | In | Type | Description |
|---|---|---|---|
namerequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
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.#
/lmkit/v1/admin/inferences/cancel-allResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/server/restartResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/inferences/{id}/cancelInference ids are node-local counters. The active list names the node it was read from (node); a cancel that carries that tag and reaches another node answers 421 instead of aborting an unrelated inference that happens to share the number.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer (int64) | |
node | query | string | Tag of the node whose active list showed this id; the cancel applies only on that node. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 421 | Misdirected Request |
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.#
/lmkit/v1/admin/activity/recentParameters
| Name | In | Type | Description |
|---|---|---|---|
count | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/logs/downloadStreams 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
| Status | Type | Description |
|---|---|---|
| 200 | text/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.#
/lmkit/v1/admin/logs/fileReads every retained log file (server.log plus rotated archives) and returns a page of entries in chronological order. Without
Parameters
| Name | In | Type | Description |
|---|---|---|---|
maxLines | query | object (int32) | |
beforeLine | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/logs/file" \
-H "Authorization: Bearer $LMKIT_API_KEY"Reads log entries newest first, filtered on the server. An entry is one logged event: its header line (timestamp, level, source, message) plus the stack-trace lines written under it. <c>levels</c> is a comma-separated list of debug, info, warning, error (empty = every level); <c>source</c> a case-insensitive substring of the source; <c>q</c> a case-insensitive substring of the message or its trace; <c>sinceMinutes</c> bounds the age (0 = unbounded). The scan walks the retained history backwards from <c>beforeLine</c> (default: the newest line) until <c>limit</c> entries match, the age bound is crossed, history ends, or <c>scanBudget</c> raw lines have been read. Response: { entries: [{ line, ts, level, source, msg, trace }], fromLine, toLine, totalLines, exhausted, rangeEnd, budgetHit, scannedLines }. <c>line</c> is the header's 1-based position in the retained set (1 = oldest); pass <c>fromLine</c> back as the next <c>beforeLine</c> to continue into history.#
/lmkit/v1/admin/logs/entriesParameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | object (int32) | |
beforeLine | query | object (int32) | |
levels | query | string | |
source | query | string | |
q | query | string | |
sinceMinutes | query | object (int32) | |
scanBudget | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/logs/entries" \
-H "Authorization: Bearer $LMKIT_API_KEY"Aggregates the retained log over a window for the Logs page: counts per level, the busiest sources, one bucket per sixtieth of the window per level, and when the last warning and error were written. <c>minutes</c> is the window ending now (0 = as far back as the scan budget reaches). The scan walks the history backwards from the newest line and stops at the window start, at the start of history, or after <c>scanBudget</c> raw lines (then <c>complete</c> is false and the counts are a floor). Response: { sinceUtc, untilUtc, bucketSeconds, buckets: [{ ts, info, warning, error }], total, debug, info, warning, error, sources: [{ name, total, warning, error }], lastWarningUtc, lastErrorUtc, scannedLines, totalLines, complete }.#
/lmkit/v1/admin/logs/overviewParameters
| Name | In | Type | Description |
|---|---|---|---|
minutes | query | object (int32) | |
scanBudget | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/logs/overview" \
-H "Authorization: Bearer $LMKIT_API_KEY"Clears the server log file.#
/lmkit/v1/admin/logs/clearResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/requests/clearResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/requestsAll filter parameters are optional and AND-combine. method: GET/POST/etc. statusClass: 2xx/3xx/4xx/5xx, or failed (every 4xx and 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
| Name | In | Type | Description |
|---|---|---|---|
method | query | string | |
statusClass | query | string | |
statusCode | query | object (int32) | |
path | query | string | |
pathExact | query | string | |
clientIp | query | string | |
apiKeyId | query | string | |
apiKey | query | string | |
requestId | query | string | |
minMs | query | object (double) | |
maxMs | query | object (double) | |
keyPresence | query | string | |
hasError | query | boolean | |
sinceUtc | query | string (date-time) | |
untilUtc | query | string (date-time) | |
limit | query | object (int32) | |
offset | query | object (int32) | |
sort | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/requests/timeseriesAggregates 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
| Name | In | Type | Description |
|---|---|---|---|
method | query | string | |
statusClass | query | string | |
statusCode | query | object (int32) | |
path | query | string | |
pathExact | query | string | |
clientIp | query | string | |
apiKeyId | query | string | |
apiKey | query | string | |
requestId | query | string | |
minMs | query | object (double) | |
maxMs | query | object (double) | |
keyPresence | query | string | |
hasError | query | boolean | |
sinceUtc | query | string (date-time) | |
untilUtc | query | string (date-time) | |
bucketSeconds | query | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/requests/statsAggregates 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
| Name | In | Type | Description |
|---|---|---|---|
method | query | string | |
statusClass | query | string | |
statusCode | query | object (int32) | |
path | query | string | |
pathExact | query | string | |
clientIp | query | string | |
apiKeyId | query | string | |
apiKey | query | string | |
requestId | query | string | |
minMs | query | object (double) | |
maxMs | query | object (double) | |
keyPresence | query | string | |
hasError | query | boolean | |
sinceUtc | query | string (date-time) | |
untilUtc | query | string (date-time) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/requests/aggregateGroups 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
| Name | In | Type | Description |
|---|---|---|---|
by | query | string | |
top | query | object (int32) | |
method | query | string | |
statusClass | query | string | |
statusCode | query | object (int32) | |
path | query | string | |
pathExact | query | string | |
clientIp | query | string | |
apiKeyId | query | string | |
apiKey | query | string | |
requestId | query | string | |
minMs | query | object (double) | |
maxMs | query | object (double) | |
keyPresence | query | string | |
hasError | query | boolean | |
sinceUtc | query | string (date-time) | |
untilUtc | query | string (date-time) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/requests/exportStreams 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
| Name | In | Type | Description |
|---|---|---|---|
method | query | string | |
statusClass | query | string | |
statusCode | query | object (int32) | |
path | query | string | |
pathExact | query | string | |
clientIp | query | string | |
apiKeyId | query | string | |
apiKey | query | string | |
requestId | query | string | |
minMs | query | object (double) | |
maxMs | query | object (double) | |
keyPresence | query | string | |
hasError | query | boolean | |
sinceUtc | query | string (date-time) | |
untilUtc | query | string (date-time) | |
sort | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | text/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.#
/lmkit/v1/admin/downloads/startSchedules 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 ·
| Property | Type | Description |
|---|---|---|
modelId | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/downloads/cancelRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
modelId | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/downloads/activeResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/ocr/textract/testSigns 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 ·
| Property | Type | Description |
|---|---|---|
awsAccessKeyId | string | |
awsSecretAccessKey | string | |
awsRegion | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/logs/streamResponses
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/config/exportResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/config/importReplaces 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
| Property | Type | Description |
|---|---|---|
file |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 409 | Conflict |
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.#
/lmkit/v1/admin/models/unloadRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
modelUri | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/loadRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
modelUri | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/deleteRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
modelUri | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
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 the model files in the model storage directory. Unloads any in-memory models first.#
/lmkit/v1/admin/models/delete-allRemoves the model files under the configured model directory: catalog downloads, extracted LMK components and their .origin sidecars, each under the cross-process materialization lock so a sibling node's in-flight pull or extraction is never interrupted (a file another process is writing is left in place and listed under 'failed'). The blob store (blobs/), the training workbench (training/) and lock files are never touched; a partial download or extraction staging file goes only when nobody holds its destination. Any currently-loaded model is unloaded first so its file can be removed (unloads that fail because the model is in use are counted in 'skippedInUse'); active downloads are cancelled best-effort. On a node carrying a fleet signal (managed configuration or a shared identity store) the request must acknowledge that the fleet is drained ({"drained": true}); without it the call answers 409 with 'drainedRequired', because the delete unlinks every model file on the shared volume underneath any sibling still serving from it. Returns the aggregate count and byte total of deleted files, plus the files that could not be deleted.
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
drained | boolean | Acknowledges that no other node serves from this model directory right now. Required when the node carries a fleet signal (managed configuration or a shared identity store): the delete unlinks every model file on the shared volume, underneath any sibling still serving from it. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 409 | Conflict |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/delete-all" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"drained": false
}'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.#
/lmkit/v1/admin/uploads/disk-usageResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/uploads/delete-allWipes 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/uploads/filesReturns 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/uploads/downloadThe 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
| Name | In | Type | Description |
|---|---|---|---|
path | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/uploads/download-allStreams 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
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/hibernation/disk-usageResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/hibernation/delete-allWipes 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/searchRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
clusterId | string | |
isDefault | boolean | |
fullTextStore | string | |
vectorStore | string | |
qdrantUrl | string | |
qdrantApiKey | string | |
dataDirectory | string | |
connectionString | string | |
host | string | |
port | object (int32) | |
database | string | |
username | string | |
password | string | |
adminUsername | string | |
adminPassword | string | |
maxConnections | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/testRequest body
text/json ·
| Property | Type | Description |
|---|---|---|
clusterId | string | |
isDefault | boolean | |
fullTextStore | string | |
vectorStore | string | |
qdrantUrl | string | |
qdrantApiKey | string | |
dataDirectory | string | |
connectionString | string | |
host | string | |
port | object (int32) | |
database | string | |
username | string | |
password | string | |
adminUsername | string | |
adminPassword | string | |
maxConnections | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/testParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
clusterId | string | |
isDefault | boolean | |
fullTextStore | string | |
vectorStore | string | |
qdrantUrl | string | |
qdrantApiKey | string | |
dataDirectory | string | |
connectionString | string | |
host | string | |
port | object (int32) | |
database | string | |
username | string | |
password | string | |
adminUsername | string | |
adminPassword | string | |
maxConnections | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/connectionParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/connectionParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
clusterId | string | |
isDefault | boolean | |
fullTextStore | string | |
vectorStore | string | |
qdrantUrl | string | |
qdrantApiKey | string | |
dataDirectory | string | |
connectionString | string | |
host | string | |
port | object (int32) | |
database | string | |
username | string | |
password | string | |
adminUsername | string | |
adminPassword | string | |
maxConnections | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/defaultParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenantsThe 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
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
fresh | query | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenantsParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
displayName | string | |
grantKeyIds | string[] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/accessA key can reach the tenant when it has been granted that tenant. Revoked keys are omitted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/accessGranting 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
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
apiKeyId | string | |
grant | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/healthParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/clusters/search/{clusterId}/storageParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
maxStorageGb | object (double) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/column-storageParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/diagnosticsParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/search/workerResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/search/metricsParameters
| Name | In | Type | Description |
|---|---|---|---|
count | query | object (int32) | |
stride | query | object (int32) | |
cluster | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/search/top-queriesParameters
| Name | In | Type | Description |
|---|---|---|---|
cluster | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/search/slow-queries/resetParameters
| Name | In | Type | Description |
|---|---|---|---|
cluster | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/explainParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
tenant_id | object (int64) | |
query | string | |
ft_config | string | |
mode | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/analyzeParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/rebuild-fulltext-indexParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/rebuild-vector-indexesParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) | |
scope | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 202 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/cancel-deleteParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/whaleParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
enabled | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/embedding-modelParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
embedding_model | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/ocrParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
enable_ocr | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/search-modesParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
enable_full_text_search | boolean | |
enable_semantic_search | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/analyzerParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
fold_case | boolean | |
fold_diacritics | boolean | |
normalize_unicode | boolean | |
enable_stemming | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/reindex-fulltextParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/reindex-semanticParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 202 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/cancel-reindex-semanticParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/configParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
embedding_model | string | |
enable_full_text_search | boolean | |
enable_semantic_search | boolean | |
enable_ocr | boolean | |
ocr_noise_rejection | boolean | |
normalization | ||
rerank_model | string | |
query_model | string | |
quality_gate_mode | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/search/failed-input-captureResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/search/failed-input-captureRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
enabled | boolean | |
directory | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/search/quality-gateResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/search/quality-gateRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
mode | string | |
profile | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/search/reindex-parallelismResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/search/reindex-parallelismRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
parallelism | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/clusters/search/{clusterId}/database-advisorParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
refresh | query | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/search/ingestion-limitsResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/search/ingestion-limitsRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
maxCharsPerPage | object (int32) | |
maxCharsPerNonPaginatedPage | object (int32) | |
maxPagesPerDocument | object (int32) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collectionsPaged: 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
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) | |
offset | query | object (int32) | |
limit | query | object (int32) | |
q | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/modelsParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/rerank-modelsParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/query-modelsParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) | |
collectionIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
display_name | string | |
languages | string[] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) | |
collectionIdrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 202 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}/rebuildParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) | |
collectionIdrequired | path | integer (int64) |
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
rebuild_semantic | boolean | |
rebuild_full_text | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/clusters/search/{clusterId}/tenants/{tenantId}/collections/{collectionId}/cancel-deleteParameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | integer (int64) | |
collectionIdrequired | path | integer (int64) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/collectionsResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/playground/doc/uploadRequest body
application/x-www-form-urlencoded · object
| Property | Type | Description |
|---|---|---|
ContentType | string | |
ContentDisposition | string | |
Headers | object | |
Length | object (int64) | |
Name | string | |
FileName | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/from-urlThe 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 ·
| Property | Type | Description |
|---|---|---|
url | string | Absolute http(s) address of the document to fetch. |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/files/{fileId}/contentThe 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
| Name | In | Type | Description |
|---|---|---|---|
fileIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/sessionStreams 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 ·
| Property | Type | Description |
|---|---|---|
fileId | string | The file id returned by the upload endpoint. |
model | string | Chat model id; blank rides the server default. |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/askSSE: 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 ·
| Property | Type | Description |
|---|---|---|
sessionId | string | The session id returned by the session endpoint. |
question | string | The question to answer from the document. |
requestId | string | Client-generated id for this exchange, used by skip-thinking. |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/attachIndexes 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 ·
| Property | Type | Description |
|---|---|---|
sessionId | string | The session to add the document to. |
fileId | string | The file id returned by the upload endpoint. |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/redact/applyThe 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 ·
| Property | Type | Description |
|---|---|---|
fileId | string | The file the reviewed proposal targets. |
areas | [] | The reviewed areas to burn, in page points with a top-left origin. |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/stateA liveness probe for the page's warmth indicator. Does NOT refresh the session's idle clock, so asking never keeps a session alive.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
sessionId | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/skip-thinkingAddresses the document turn by the requestId it was asked with. Answers 404 when no exchange with that id is streaming on this node.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
sessionId | string | The session id returned by the session endpoint. |
question | string | The question to answer from the document. |
requestId | string | Client-generated id for this exchange, used by skip-thinking. |
Responses
| Status | Type | Description |
|---|---|---|
| 202 | Accepted | |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found |
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).#
/lmkit/v1/admin/playground/doc/session/{sessionId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
sessionIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/file/{fileId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
fileIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/thumb/{fileId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
fileIdrequired | path | string | |
page | query | object (int32) | Zero-based page index. |
size | query | object (int32) | Longest-side pixel size. |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/doc/locateFuzzy-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 ·
| Property | Type | Description |
|---|---|---|
fileId | string | The file id of the uploaded document. |
page | object (int32) | 1-based page number to search on. |
excerpt | string | The citation excerpt to locate on the page. |
Responses
| Status | Type | Description |
|---|---|---|
| 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"
}'The identity domain this node belongs to (admin).#
/lmkit/v1/admin/farmThe deployment mode, the identity store this node uses, the roster of nodes that heartbeat into it, and whether this node may join a farm from here (an unmanaged single node on the embedded store, Owner only).
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/farm" \
-H "Authorization: Bearer $LMKIT_API_KEY"Forgets a stale node's heartbeat row (owner).#
/lmkit/v1/admin/farm/nodes/{name}Removes the roster row of a node that has missed three sync periods. A live row and this node's own row refuse; a node that comes back writes a new row on its first heartbeat. Nothing else changes: no request reaches the other node.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
namerequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
curl -X DELETE "$LMKIT_ONE_URL/lmkit/v1/admin/farm/nodes/$NAME" \
-H "Authorization: Bearer $LMKIT_API_KEY"Records the configuration sections an Owner accepts as differing on one node (owner).#
/lmkit/v1/admin/farm/nodes/{name}/acknowledgedA heterogeneous fleet has nodes whose hardware-bound settings legitimately differ. This records, on the node's own roster row, the sections whose difference is accepted, so the Farm page stops flagging them while still naming them; an empty list withdraws every acceptance. A section must be one the node or this node reports a digest for. The heartbeat never rewrites the acceptance.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
namerequired | path | string |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
sections | string[] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found |
curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/admin/farm/nodes/$NAME/acknowledged" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sections": [
"string"
]
}'Probes a shared identity database before joining (owner).#
/lmkit/v1/admin/farm/testOpens the target with the given engine and connection string, creates the identity schema when absent, refuses a database that hosts knowledge-base content, and reports whether the target already holds operator accounts. Nothing on this node changes.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
engine | string | |
connectionString | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 409 | Conflict |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/farm/test" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"engine": "string",
"connectionString": "string"
}'Joins a farm: points this node at a shared identity database (owner).#
/lmkit/v1/admin/farm/joinCopies this node's identity domain into the shared database (or merges into a farm that already exists), writes Admin:Identity and Deployment:Mode=Farm into this node's settings file, and returns the domain key once with the environment block every node needs and the prerequisites this node still has to meet. The running node keeps serving from its embedded store until it restarts.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
engine | string | |
connectionString | string | |
copyDomain | boolean | |
merge | boolean | |
domainKey | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 409 | Conflict |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/farm/join" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"engine": "string",
"connectionString": "string",
"copyDomain": false,
"merge": false
}'Lists server-side directories for the admin panel's folder picker (host sessions only).#
/lmkit/v1/admin/fs/directoriesReturns {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
| Name | In | Type | Description |
|---|---|---|---|
path | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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#
/lmkit/v1/admin/mcp/catalogReturns 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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#
/lmkit/v1/admin/mcp/sessionsReturns the live sessions of the MCP endpoint across the farm, newest activity first: the client name and version reported at initialization, the negotiated protocol version, age, idle time, the number of tool calls served on every node, and the tag of the node that completed the handshake. Returns an empty list when the endpoint is disabled. Read-only.
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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#
/lmkit/v1/admin/mcp/promptsReturns 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/mcp/tools/invokeExecutes 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 ·
| Property | Type | Description |
|---|---|---|
name | string | |
arguments | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/memory/storesResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/memory/stores/{store}/keysParameters
| Name | In | Type | Description |
|---|---|---|---|
storerequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/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
| Name | In | Type | Description |
|---|---|---|---|
storerequired | path | string | |
keyrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/memory/stores/{store}/keys/{key}Parameters
| Name | In | Type | Description |
|---|---|---|---|
storerequired | path | string | |
keyrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/memory/stores/{store}/keys/{key}/facts/{factId}Parameters
| Name | In | Type | Description |
|---|---|---|---|
storerequired | path | string | |
keyrequired | path | string | |
factIdrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/memory/stores/{store}/keys/{key}/consolidateRuns 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
| Name | In | Type | Description |
|---|---|---|---|
storerequired | path | string | |
keyrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/importRegisters 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 ·
| Property | Type | Description |
|---|---|---|
path | string | Absolute path of the model file on the server (GGUF or LMK). Mutually exclusive with 'url'. |
url | string | 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'. |
probe | boolean | When true, the imported model is loaded and exercised (decode, tool round-trip, embeddings) and the measured verdicts are recorded on the record. |
name | string | Name the model serves under (name[:tag]). Must not collide with a catalog model or an existing custom model. |
aliases | string[] | Alternate names resolving to the same model. |
toolDialect | string | Tool-call dialect override for models whose template fingerprint is unrecognized (a ToolCallingFormat name). |
license | string | License identifier or text recorded with the model. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/custom/probeLoads 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
| Name | In | Type | Description |
|---|---|---|---|
name | query | string | The custom model's canonical name. A query parameter because hub-imported names carry slashes. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/tool-dialectsThe dialect names accepted by the import's toolDialect field, straight from the engine's enum so the admin UI never drifts from it.
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/customResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/models/customUnloads the model if resident, then removes its registry record. An imported file outside the blob store stays on disk: imported files are operator-owned. Blob-store artifacts the record referenced are reclaimed only when no other record on this node and no other node's registry still references them; nothing else in the blob directory is touched. A model actively serving requests is refused.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name | query | string | The custom model's canonical name. A query parameter because hub-imported names carry slashes. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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"Lists the blob-store files no custom model on this node references (Owner).#
/lmkit/v1/admin/models/blobs/unreferencedThe candidates for an explicit reclaim, each with its size, last write time and the number of OTHER registries that mark it as referenced. The blob directory may sit on a volume several nodes share and each node keeps its own registry, so an unreferenced blob here can be what a sibling node's custom model is built from: a positive holder count says exactly that. Nothing is deleted by listing.
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 403 | Forbidden |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/admin/models/blobs/unreferenced" \
-H "Authorization: Bearer $LMKIT_API_KEY"Deletes the given unreferenced blob-store files (Owner).#
/lmkit/v1/admin/models/blobs/reclaimThe explicit reclaim: deletes exactly the digests listed in the request, refusing each one a custom model on this node references and, unless includeHeld is set, each one another registry sharing the blob directory still marks as referenced. Every digest answers with its own outcome; nothing outside the request is touched.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
digests | string[] | Digests to delete (sha256: |
includeHeld | boolean | Also delete blobs another registry sharing the blob directory still marks as referenced. Off by default: such a blob is what a sibling node's custom model is built from. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 403 | Forbidden |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/admin/models/blobs/reclaim" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"digests": [
"string"
],
"includeHeld": false
}'Transcribes a recorded audio clip into text (admin playground).#
/lmkit/v1/admin/playground/transcribeMultipart 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
| Property | Type | Description |
|---|---|---|
ContentType | string | |
ContentDisposition | string | |
Headers | object | |
Length | object (int64) | |
Name | string | |
FileName | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/titleOne 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 ·
| Property | Type | Description |
|---|---|---|
model | string | Catalog model ID; blank uses the server's default chat model. |
user | string | The conversation's first user message (may be trimmed). |
answer | string | The first answer (may be trimmed). |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/playground/chat/skip-thinkingAddresses 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. Answers 404 when no exchange with that request_id is streaming on this node.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
request_id | string | The request_id the exchange was started with. |
Responses
| Status | Type | Description |
|---|---|---|
| 202 | Accepted | |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found |
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).#
/lmkit/v1/admin/playground/chat/streamThe 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 ·
| Property | Type | Description |
|---|---|---|
model | string | Catalog model ID; blank uses the server's default chat model. |
system | string | Optional system prompt prepended to the conversation. |
messages | [] | The conversation so far, ending with the user message to answer. Roles: system, user, assistant. |
temperature | object (float) | Sampling temperature. 0 selects greedy decoding. |
top_p | object (float) | Nucleus sampling cutoff: only tokens within this cumulative probability mass are considered. 1 disables the cutoff. |
top_k | object (int32) | Top-K sampling cutoff: only the K most likely tokens are considered. Absent keeps the sampler's default. |
min_p | object (float) | Minimum probability cutoff relative to the most likely token. Absent keeps the sampler's default. |
seed | object (uint32) | Sampling seed for reproducible generation. Absent samples freely. |
max_tokens | object (int32) | Upper bound on the completion length, in tokens. |
n | object (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'. |
logprobs | boolean | true returns the log probability of every generated token (thinking and tool channels included, in generation order) on the terminal summary. |
top_logprobs | object (int32) | 0 to 20: how many of the most likely alternatives to report at each position. A positive value implies logprobs. |
logit_bias | object | 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. |
stop | string[] | Sequences that end the completion when generated. The matched sequence is not included in the answer. |
frequency_penalty | object (float) | Penalizes tokens by how often they already appeared, reducing repetition. 0 disables. |
presence_penalty | object (float) | Penalizes tokens that appeared at all, encouraging new topics. 0 disables. |
repeat_penalty | object (float) | Multiplicative repetition penalty over recent tokens. Absent keeps the sampler's default. |
reasoning | string | 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_tools | string[] | 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_choice | one of object · | |
stream | boolean | true streams server-sent events (status, delta, skill, done, error); false returns one JSON result. |
request_id | string | Optional caller-generated identifier for this exchange, used to address it from side channels (e.g. skip-thinking). |
skill | string | Optional name of a server skill pinned for this exchange: its instructions ride the system turn. |
skills | string[] | 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_inputs | object | Answers to the pinned skill's activation questions, keyed by each question's slug. Unanswered questions fall back to their declared defaults. |
memory | string | Optional agent-memory id: facts extracted from this exchange persist on the serving node under this id (per node on a load-balanced fleet), 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_store | string | 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. |
agent | string | 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
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/setup/stateResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/setup/planRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
recipe | string | |
answers | ||
planDigest | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/setup/applyRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
recipe | string | |
answers | ||
planDigest | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/setup/verifyRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
recipe | string | |
answers | ||
planDigest | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/playground/skillsReturns {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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/skills/catalogThe 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/skills/skillThe editable fields: description, the SKILL.md instruction body, and the manual-only flag, plus the read-only version and folder.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/skills/install-urlFetches the skill, copies it into the skills directory, and registers it immediately. Existing names are never overwritten.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
url | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 409 | Conflict |
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).#
/lmkit/v1/admin/skills/resources/addUploads 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
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
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).#
/lmkit/v1/admin/skills/resources/deleteRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
name | string | |
path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
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).#
/lmkit/v1/admin/skills/createWrites 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 ·
| Property | Type | Description |
|---|---|---|
name | string | |
description | string | |
instructions | string | |
manualOnly | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/skills/updateUpdates the skill's SKILL.md in place, preserving version, license, and mode fields, and re-registers it immediately.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
name | string | |
description | string | |
instructions | string | |
manualOnly | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
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).#
/lmkit/v1/admin/skills/deleteRemoves the folder and unregisters the skill. Refuses folders outside the configured skills directory.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
name | string | |
description | string | |
instructions | string | |
manualOnly | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
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).#
/lmkit/v1/admin/skills/draftOne 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 ·
| Property | Type | Description |
|---|---|---|
name | string | |
description | string | |
audience | string | |
tone | string | |
format | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/skills/predefinedThe curated skills the panel offers for one-click install: name, description, and whether a skill with that name is already registered.
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/skills/installWrites 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 ·
| Property | Type | Description |
|---|---|---|
names | string[] |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 409 | Conflict |
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.#
/lmkit/v1/admin/sso/statusAnonymous 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/sso/testFetches
Request body
text/json ·
| Property | Type | Description |
|---|---|---|
authority | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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.#
/lmkit/v1/admin/sso/challengeStores 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
| Name | In | Type | Description |
|---|---|---|---|
return | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/sso/callbackThe 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
| Name | In | Type | Description |
|---|---|---|---|
code | query | string | |
state | query | string | |
error | query | string | |
error_description | query | string |
Responses
| Status | Type | Description |
|---|---|---|
| 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.#
/lmkit/v1/admin/playground/toolsReturns {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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/playground/tools/enableAllows 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 ·
| Property | Type | Description |
|---|---|---|
tools | string[] | |
ingestRoot | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 409 | Conflict |
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).#
/lmkit/v1/admin/playground/agents/instructionsReplaces 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 ·
| Property | Type | Description |
|---|---|---|
name | string | |
system | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict |
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).#
/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 in the memory of the node that served the turn; an expired handle returns 404, and a handle another node minted answers 421 naming that node.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | text/plain | OK |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 421 | Misdirected Request |
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.#
/lmkit/v1/admin/agents/usageResponses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/tools/catalogThe 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/tools/websearch-checkReturns {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 ·
| Property | Type | Description |
|---|---|---|
baseUrl | string |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/connectors/statusConnectors 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
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/jobsResponses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/training/jobsRequest body
application/json ·
| Property | Type | Description |
|---|---|---|
model | string | Identifier of the base model to fine-tune. If omitted, the default chat model is used. |
stage | string | 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_text | string | 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_id | string | 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. |
rank | object (int32) | LoRA rank (inner dimension of the adapter). Higher adds capacity and size. Default 8. |
alpha | object (float) | LoRA alpha scaling factor. Effective scale is alpha/rank. Default 16. |
target_modules | string | Which modules receive adapters: 'attention' (default), 'attention_and_feedforward', or 'all'. |
epochs | object (int32) | Number of passes over the training set. Default 3. |
learning_rate | object (float) | Initial AdamW learning rate. Default 1e-4. |
gradient_accumulation | object (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_rslora | boolean | 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_schedule | string | Learning-rate schedule: 'cosine' (default), 'constant', 'linear', 'cosine_with_restarts', or 'polynomial'. |
weight_decay | object (float) | AdamW weight decay. |
max_grad_norm | object (float) | Gradient clipping by global norm before each optimizer step. Default 1.0; 0 disables clipping. |
min_learning_rate | object (float) | Floor the decaying schedules approach. Ignored by the constant schedule. |
warmup_ratio | object (float) | Fraction of steps spent warming the learning rate up from zero. Default 0. |
validation_split | object (float) | Fraction of samples held out for per-epoch validation. Default 0.05. |
assistant_loss_only | boolean | Compute loss only on assistant tokens (standard for instruction tuning). Default true. |
sequence_packing | boolean | Pack consecutive short samples into shared training windows. Loss never crosses a sample boundary; image samples are never packed. Default false. |
seed | object (uint32) | Seed for reproducible adapter initialization. 0 means non-deterministic. |
cutoff_length | object (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; a positive value is rounded up to the runtime's 256-token block, with a floor of 256. |
checkpoint_steps | object (int32) | Save a training checkpoint (adapter weights + optimizer state) every N optimizer steps, enabling resume. 0 disables checkpointing. |
early_stopping_patience | object (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_best | boolean | 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_batch | object (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_ratio | object (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_alpha | object (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_layer | object (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_layer | object (int32) | Last transformer block that receives adapters, inclusive. 0 (the default) extends to the last block. |
full_precision | boolean | 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_quantization | string | 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. |
output | string | Artifact to produce: 'adapter' (default, a small LoRA GGUF) or 'model' (base merged with the adapter). |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/training/datasetAccepts 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
| Property | Type | Description |
|---|---|---|
file |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/jobs/{jobId}/cancelTraining halts after the current batch; the partially-trained adapter is still saved. A job another node of a fleet runs is stopped through a request written beside its journal on the shared volume, answered 202: that node halts the run after its current batch. A finished job answers 409; a job whose journal this node cannot see answers 421 naming its node.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The training job identifier. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | application/json | Accepted |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict | |
| 421 | Misdirected Request |
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).#
/lmkit/v1/admin/training/precisionThe 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
| Name | In | Type | Description |
|---|---|---|---|
model | query | string | The catalog model ID to resolve. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/preflightCoarse 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 ·
| Property | Type | Description |
|---|---|---|
model | string | Catalog model ID; blank prices the server's default chat model. |
rank | object (int32) | |
target_modules | string | |
full_precision | boolean |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/jobs/{jobId}/chatLoads 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
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The training job identifier. |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
messages | [] | The conversation so far, ending with the user message to answer. Roles: system, user, assistant. |
max_tokens | object (int32) | Upper bound on the completion length, in tokens. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/dataset/statsTokenizes 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 ·
| Property | Type | Description |
|---|---|---|
model | string | Identifier of the base model to fine-tune. If omitted, the default chat model is used. |
stage | string | 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_text | string | 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_id | string | 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. |
rank | object (int32) | LoRA rank (inner dimension of the adapter). Higher adds capacity and size. Default 8. |
alpha | object (float) | LoRA alpha scaling factor. Effective scale is alpha/rank. Default 16. |
target_modules | string | Which modules receive adapters: 'attention' (default), 'attention_and_feedforward', or 'all'. |
epochs | object (int32) | Number of passes over the training set. Default 3. |
learning_rate | object (float) | Initial AdamW learning rate. Default 1e-4. |
gradient_accumulation | object (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_rslora | boolean | 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_schedule | string | Learning-rate schedule: 'cosine' (default), 'constant', 'linear', 'cosine_with_restarts', or 'polynomial'. |
weight_decay | object (float) | AdamW weight decay. |
max_grad_norm | object (float) | Gradient clipping by global norm before each optimizer step. Default 1.0; 0 disables clipping. |
min_learning_rate | object (float) | Floor the decaying schedules approach. Ignored by the constant schedule. |
warmup_ratio | object (float) | Fraction of steps spent warming the learning rate up from zero. Default 0. |
validation_split | object (float) | Fraction of samples held out for per-epoch validation. Default 0.05. |
assistant_loss_only | boolean | Compute loss only on assistant tokens (standard for instruction tuning). Default true. |
sequence_packing | boolean | Pack consecutive short samples into shared training windows. Loss never crosses a sample boundary; image samples are never packed. Default false. |
seed | object (uint32) | Seed for reproducible adapter initialization. 0 means non-deterministic. |
cutoff_length | object (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; a positive value is rounded up to the runtime's 256-token block, with a floor of 256. |
checkpoint_steps | object (int32) | Save a training checkpoint (adapter weights + optimizer state) every N optimizer steps, enabling resume. 0 disables checkpointing. |
early_stopping_patience | object (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_best | boolean | 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_batch | object (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_ratio | object (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_alpha | object (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_layer | object (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_layer | object (int32) | Last transformer block that receives adapters, inclusive. 0 (the default) extends to the last block. |
full_precision | boolean | 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_quantization | string | 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. |
output | string | Artifact to produce: 'adapter' (default, a small LoRA GGUF) or 'model' (base merged with the adapter). |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/jobs/{jobId}Removes the job's record, artifact, checkpoints, and materialized dataset. A running job must be stopped first, and a job another node is still running is stopped and deleted from that node (421 names it); a sibling's finished job is removed from the shared volume by any node.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The training job identifier. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/json | OK |
| 401 | Unauthorized | |
| 404 | Not Found | |
| 409 | Conflict | |
| 421 | Misdirected Request |
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).#
/lmkit/v1/admin/training/jobs/{jobId}/checkpointsParameters
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The training job identifier. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/jobs/{jobId}/checkpoints/{step}/adapterParameters
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The training job identifier. |
steprequired | path | object (int64) | The checkpoint's optimizer step. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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).#
/lmkit/v1/admin/training/jobs/{jobId}/resumeStarts 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
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The source training job identifier. |
step | query | object (int64) | Checkpoint step to resume from; the latest checkpoint when omitted. |
Responses
| Status | Type | Description |
|---|---|---|
| 202 | Accepted | |
| 400 | Bad Request | |
| 401 | Unauthorized | |
| 421 | Misdirected Request |
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).#
/lmkit/v1/admin/training/jobs/{jobId}/chat/streamServer-sent events: 'delta' events carry {t: 'thinking'|'text', d: fragment} as the model decodes, then one 'done' event with the full visible answer.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The training job identifier. |
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
messages | [] | The conversation so far, ending with the user message to answer. Roles: system, user, assistant. |
max_tokens | object (int32) | Upper bound on the completion length, in tokens. |
Responses
| Status | Type | Description |
|---|---|---|
| 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).#
/lmkit/v1/admin/training/jobs/{jobId}/artifactParameters
| Name | In | Type | Description |
|---|---|---|---|
jobIdrequired | path | string | The training job identifier. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | application/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"