|
1 | 1 | --- |
2 | 2 | title: LM Studio API |
3 | 3 | sidebar_title: Overview |
4 | | -description: Get started with LM Studio's REST API for local model management and inference. |
5 | | -fullPage: true |
| 4 | +description: LM Studio's REST API for local inference and model management |
| 5 | +fullPage: false |
6 | 6 | index: 1 |
7 | 7 | --- |
8 | 8 |
|
9 | | -LM Studio offers a powerful REST API with first-class support for local model management and inference. In addition to our native API, we provide full OpenAI compatibility mode ([learn more](/docs/developer/openai-compat)). |
| 9 | +LM Studio offers a powerful REST API with first-class support for local inference and model management. In addition to our native API, we provide full OpenAI compatibility mode ([learn more](/docs/developer/openai-compat)). |
10 | 10 |
|
11 | | -Our REST API handles local LLM workflows with model downloading, loading, configuration, and inference. Get performance stats like tokens per second, model status, context length, quantization info, and more. Configure loading parameters to customize how models initialize. |
| 11 | +## What's new |
| 12 | +Previously, there was a [v0 REST API](/docs/developer/rest/endpoints). That API has since been deprecated in favor of the v1 REST API. |
12 | 13 |
|
13 | | -### Supported endpoints |
| 14 | +The v1 REST API includes enhanced features such as: |
| 15 | +- [MCP via API](/docs/developer/core/mcp) |
| 16 | +- [Stateful chats](/docs/developer/rest/stateful-chats) |
| 17 | +- [Authentication](/docs/developer/core/authentication) configuration with API tokens |
| 18 | +- Model [download](/docs/developer/rest/download) and [load](/docs/developer/rest/load) endpoints |
| 19 | + |
| 20 | +## Supported endpoints |
| 21 | +The following endpoints are available in LM Studio's v1 REST API. |
14 | 22 | <table class="flexible-cols"> |
15 | 23 | <thead> |
16 | 24 | <tr> |
@@ -48,6 +56,63 @@ Our REST API handles local LLM workflows with model downloading, loading, config |
48 | 56 | </tbody> |
49 | 57 | </table> |
50 | 58 |
|
| 59 | +## Inference endpoint comparison |
| 60 | +The table below compares the features of LM Studio's `api/v1/chat` endpoint with the OpenAI-compatible `v1/responses` and `v1/chat/completions` endpoints. |
| 61 | +<table class="flexible-cols"> |
| 62 | + <thead> |
| 63 | + <tr> |
| 64 | + <th>Feature</th> |
| 65 | + <th><code>api/v1/chat</code></th> |
| 66 | + <th><code>v1/responses</code></th> |
| 67 | + <th><code>v1/chat/completions</code></th> |
| 68 | + </tr> |
| 69 | + </thead> |
| 70 | + <tbody> |
| 71 | + <tr> |
| 72 | + <td>Stateful chat</td> |
| 73 | + <td>✅</td> |
| 74 | + <td>✅</td> |
| 75 | + <td>❌</td> |
| 76 | + </tr> |
| 77 | + <tr> |
| 78 | + <td>Remote MCPs</td> |
| 79 | + <td>✅</td> |
| 80 | + <td>✅</td> |
| 81 | + <td>❌</td> |
| 82 | + </tr> |
| 83 | + <tr> |
| 84 | + <td>MCPs you have in LM Studio</td> |
| 85 | + <td>✅</td> |
| 86 | + <td>✅</td> |
| 87 | + <td>❌</td> |
| 88 | + </tr> |
| 89 | + <tr> |
| 90 | + <td>Custom tools</td> |
| 91 | + <td>❌</td> |
| 92 | + <td>✅</td> |
| 93 | + <td>✅</td> |
| 94 | + </tr> |
| 95 | + <tr> |
| 96 | + <td>Model load streaming events</td> |
| 97 | + <td>✅</td> |
| 98 | + <td>❌</td> |
| 99 | + <td>❌</td> |
| 100 | + </tr> |
| 101 | + <tr> |
| 102 | + <td>Prompt processing streaming events</td> |
| 103 | + <td>✅</td> |
| 104 | + <td>❌</td> |
| 105 | + <td>❌</td> |
| 106 | + </tr> |
| 107 | + <tr> |
| 108 | + <td>Specify context length in the request</td> |
| 109 | + <td>✅</td> |
| 110 | + <td>❌</td> |
| 111 | + <td>❌</td> |
| 112 | + </tr> |
| 113 | + </tbody> |
| 114 | +</table> |
| 115 | + |
51 | 116 | --- |
52 | 117 |
|
53 | 118 | Please report bugs by opening an issue on [Github](https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues). |
0 commit comments