lmstudio-api

lmstudio-api is a skill for Claude Code, Codex from Desko77/cursor-1c-skills. It costs 199 tokens per session (4,613 once invoked), scanned A, original, MIT.

A reference for controlling LM Studio through its HTTP API. LM Studio is a local server for running AI models, and the guide covers checking, loading, unloading, and configuring models.

In plain words
What is it for?
Inspect available models, load or unload them, set context and processing options, and send requests to LM Studio.
Why use it?
It helps software use locally hosted models and makes model-server operations predictable during development and troubleshooting.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Inspect available models, load or unload them, set context and processing options, and send requests to LM Studio.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/desko77/cursor-1c-skills/lmstudio-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Desko77/cursor-1c-skills --skill lmstudio-api
Clone the repo
git clone --depth 1 https://github.com/Desko77/cursor-1c-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lmstudio-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/desko77/cursor-1c-skills/lmstudio-api.svg)](https://agentmods.dev/skills/desko77/cursor-1c-skills/lmstudio-api)
Your own site
<a href="https://agentmods.dev/skills/desko77/cursor-1c-skills/lmstudio-api"><img src="https://agentmods.dev/badge/skills/desko77/cursor-1c-skills/lmstudio-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 199 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,613 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00199 $0.04613
Opus 5 $0.00100 $0.02306
Sonnet 5 $0.00040 $0.00923
Haiku 4.5 $0.00020 $0.00461

Measured 4d ago against content hash 874d325a8e67, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

lmstudio-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/lmstudio-api/SKILL.md · 285 lines

How it starts

The opening of the file, as written. The whole thing — 285 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LM Studio API

Проверено вживую на LM Studio 0.4.x, 2026-08-07, локальный сервер на порту 1234 (AMD Strix Halo, 128 ГБ единой памяти). Замеры в конце - на qwen3-vl-30b-a3b-instruct.

Три поверхности API

Поверхность Путь Назначение
OpenAI-совместимая /v1/* инференс: chat/completions; models отдает только КАТАЛОГ скачанных
Нативная v0 (устаревшая) /api/v0/* models с полем state; управления моделями нет
Нативная v1 /api/v1/* с LM Studio 0.4.0, рекомендуемая: инференс + управление моделями

Anthropic-совместимые эндпоинты тоже заявлены в доках, не проверялись.

Эндпоинты v1

POST /api/v1/chat (НЕ /api/v1/chat/completions)
GET /api/v1/models
POST /api/v1/models/load
POST /api/v1/models/unload
POST /api/v1/models/download
GET /api/v1/models/download/status

load: обязателен model - точный ключ модели. Опционально context_length, eval_batch_size, flash_attention, num_experts, offload_kv_cache_to_gpu, echo_load_config. Всегда ставить echo_load_config: true - ответ вернет фактически примененный конфиг, и сразу видно, что сервер проигнорировал.

Ответ: {"type", "instance_id", "load_time_seconds", "status": "loaded", "load_config": {...}}. Вызов БЛОКИРУЮЩИЙ - возвращается по факту загрузки, отдельно опрашивать готовность не нужно.

unload: обязателен instance_id, НЕ имя модели. Берется из loaded_instances[].id ответа GET /api/v1/models.

GET /api/v1/models отдает {"models":[...]} с полями key, type, publisher, architecture, quantization, size_bytes, max_context_length, capabilities, loaded_instances[]. У инстанса - id и config с фактическими context_length, parallel, flash_attention, eval_batch_size, num_experts и прочим. Пустой loaded_instances = модель не загружена.

Инференс: два эндпоинта, и они НЕ равнозначны

/v1/chat/completions (OpenAI) /api/v1/chat (родной)
поле ввода messages input
схема лишние ключи проглатывает строгая, лишний ключ -> 400 unrecognized_keys
управление reasoning НЕТ (см. ниже) reasoning первым классом
ответ choices[].message.content output[].content
статистика usage stats c reasoning_output_tokens

Read the full file on GitHub · 285 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 285 lines · 199 tokens per session scan A 874d325a8e67

Subscribe to this mod's changes

lmstudio-api is a skill published in the GitHub repository Desko77/cursor-1c-skills (55 stars, last pushed 5d ago), licensed MIT. It adds 199 tokens to every session and 4,613 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

1c-meta-compile

A generator for creating 1C metadata objects from a JSON description. Metadata objects include parts of a 1C business configuration, such as catalogs, documents, registers, constants, modules, reports, and data processors.

Desko77/claude-code-skills-1c · 51 tokens

1c-cf-new-project

A workflow for creating a new 1C configuration from an empty starting point. 1C is a platform for building business applications; a configuration defines their data, screens, permissions, and behavior.

Desko77/claude-code-skills-1c · 57 tokens

1c-xdto-validate

A checker for 1C XDTO packages and their connection to a configuration. It reports errors that could make 1C reject the package or interpret its data incorrectly at runtime.

Desko77/claude-code-skills-1c · 36 tokens

1c-mcp-toolkit

A local HTTP API for working with a running 1C:Enterprise database through the MCP Toolkit processing file. 1C:Enterprise is a platform for business applications, and this tool can access its live runtime context.

Desko77/claude-code-skills-1c · 330 tokens

kd2-rules

A development guide for building data-exchange rules in 1C:Enterprise Data Conversion 2.0. This software maps objects and fields between two 1C configurations and exports the resulting rules as XML.

Desko77/claude-code-skills-1c · 280 tokens

1c-meta-info

A compact reader for 1C metadata exported as XML. Metadata describes an application's objects, such as their fields, table sections, forms, types, and document postings.

Desko77/claude-code-skills-1c · 78 tokens