文档

LM Studio REST API

卸载模型

从内存中卸载已加载的模型

POST /api/v1/models/unload

请求体

instance_id : 字符串

要卸载的模型实例的唯一标识符。

curl https://:1234/api/v1/models/unload \
  -H "Authorization: Bearer $LM_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "instance_id": "openai/gpt-oss-20b"
  }'

响应字段

instance_id : 字符串

已卸载模型实例的唯一标识符。

{
  "instance_id": "openai/gpt-oss-20b"
}

本页面源码可在 GitHub 上获取