Skip to main content

LM Studio v1 REST API Client Library

Project description

LMStd

LM Studio v1 REST API Client Library

This single-file library provides a clean, fully documented Python interface to interact with an LM Studio local server based on the v1 REST API endpoints.

Installation

You can install this package via pip once published or from the source code:

pip install lmstd

Usage

import os
from lmstd import LMStd

# Initialize the client
client = LMStd(
    base_url="http://localhost:1234", 
    api_token=os.environ.get("LMSTD_APIKEY")
)

# List available models
models = client.list_models()
print(models)

Features

  • Stateful chats: Fully utilize the stateful /api/v1/chat endpoint.
  • Model Context Protocol (MCP): Use integrations and MCP tools directly.
  • Advanced Model Management: Load, unload, and download models programmatically.
  • Streaming Support: Easy SSE-based chat streaming support.

License

Copyright (c) 2026 EMuVi (emuvi@outlook.com.br)

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmstd-0.2.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lmstd-0.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file lmstd-0.2.0.tar.gz.

File metadata

  • Download URL: lmstd-0.2.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for lmstd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0bf99d984a6d49cbbb2837162688f07ea7c405721274e9ffcfa12f61654684ff
MD5 9c92d55c4bbe7ab3ac080e050588473f
BLAKE2b-256 c014262549863f11f25efd9fcb260170d5a1d3492846cead379fb3d305a9799c

See more details on using hashes here.

File details

Details for the file lmstd-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: lmstd-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for lmstd-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 218304c7fdb00c83bdf50da73f4dcf8626c5f88fbe57e52324840a0f99e57492
MD5 89afb7d4916191547b0bf7f0598b0c58
BLAKE2b-256 df277101c4ae6d84f549a87d84bc1d66d480f93fe9ec864d0d6116e2616d3e44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page