diff --git a/1_developer/2_rest/index.md b/1_developer/2_rest/index.mdx similarity index 90% rename from 1_developer/2_rest/index.md rename to 1_developer/2_rest/index.mdx index 5c5035f..ebb2f00 100644 --- a/1_developer/2_rest/index.md +++ b/1_developer/2_rest/index.mdx @@ -23,7 +23,7 @@ The v1 REST API includes enhanced features such as: The following endpoints are available in LM Studio's v1 REST API. - +
@@ -34,32 +34,32 @@ The following endpoints are available in LM Studio's v1 REST API. - + - + - + - - - + + + - + - + @@ -69,7 +69,7 @@ The following endpoints are available in LM Studio's v1 REST API. The table below compares the features of LM Studio's `/api/v1/chat` endpoint with OpenAI-compatible and Anthropic-compatible inference endpoints. -
Endpoint
/api/v1/chat Chat
/api/v1/models List Models
/api/v1/models/load Load
/api/v1/models/unloadUnload/api/v1/models/unloadUnload
/api/v1/models/download Download
/api/v1/models/download/status Download Status
+
diff --git a/1_developer/2_rest/meta.json b/1_developer/2_rest/meta.json index 97f3ec8..c8076c7 100644 --- a/1_developer/2_rest/meta.json +++ b/1_developer/2_rest/meta.json @@ -1,15 +1,15 @@ { - "title": "REST API", + "title": "LM STUDIO REST API", "pages": [ - "chat", - "download-status", - "download", - "endpoints", - "list", - "load", "quickstart", "stateful-chats", "streaming-events", - "unload" + "chat", + "list", + "load", + "download", + "unload", + "download-status", + "endpoints" ] } diff --git a/1_developer/3_openai-compat/index.md b/1_developer/3_openai-compat/index.mdx similarity index 90% rename from 1_developer/3_openai-compat/index.md rename to 1_developer/3_openai-compat/index.mdx index 3db2b88..e760d5b 100644 --- a/1_developer/3_openai-compat/index.md +++ b/1_developer/3_openai-compat/index.mdx @@ -7,7 +7,7 @@ index: 1 ### Supported endpoints -
Feature
+
@@ -18,33 +18,33 @@ index: 1 - + - + - + - + - +
Endpoint
/v1/models Models
/v1/responses Responses
/v1/chat/completions Chat Completions
/v1/embeddings Embeddings
/v1/completions Completions
-
+
## Set the `base url` to point to LM Studio diff --git a/1_developer/4_anthropic-compat/index.md b/1_developer/4_anthropic-compat/index.mdx similarity index 81% rename from 1_developer/4_anthropic-compat/index.md rename to 1_developer/4_anthropic-compat/index.mdx index d24a538..f7602e6 100644 --- a/1_developer/4_anthropic-compat/index.md +++ b/1_developer/4_anthropic-compat/index.mdx @@ -1,13 +1,13 @@ --- title: Anthropic Compatibility Endpoints sidebar_title: Overview -description: Send Messages requests using the Anthropic-compatible API. +description: Send requests to Anthropic-compatible Messages endpoints. index: 1 --- ### Supported endpoints - +
@@ -18,14 +18,12 @@ index: 1 - +
Endpoint
/v1/messages Messages
-
- ## Using Claude Code with LM Studio For a full walkthrough, see: [Use Claude Code with LM Studio](/docs/integrations/claude-code). @@ -38,11 +36,11 @@ claude --model openai/gpt-oss-20b ## Authentication headers -When Require Authentication is enabled, LM Studio accepts both `x-api-key` and the standard `Authorization: Bearer ` header. To learn more about enabling auth in LM Studio, checkout [Authentication](/docs/developer/core/authentication). +When Require Authentication is enabled, LM Studio accepts both `x-api-key` and the standard `Authorization: Bearer ` header. To learn more about enabling auth in LM Studio, see [Authentication](/docs/developer/core/authentication). ## Set the base URL to point to LM Studio -Point your Anthropic client (or any HTTP request) at your local LM Studio server. +Point your Anthropic client, or any HTTP request, at your local LM Studio server. Note: The following examples assume the server port is `1234`. @@ -87,7 +85,6 @@ message = client.messages.create( print(message.content) ``` -If you have not enabled Require Authentication, the `x-api-key` header is optional. -For the Python example, you can also omit `api_key` when authentication is disabled. +If you have not enabled Require Authentication, the `x-api-key` header is optional. For the Python example, you can also omit `api_key` when authentication is disabled. If you're running into trouble, hop onto our [Discord](https://discord.gg/lmstudio) and enter the developers channel.