Before you start
- Install and open Magnitude.
- Download a model in Discover.
- Keep Magnitude running while your app uses it.
Configure an OpenAI-compatible app
Local inference does not require an API key.
magnitude-local is a placeholder for clients that require a nonempty key.
Use the base URL above when your app appends /chat/completions or /responses itself. If it asks for a complete endpoint URL, use the corresponding full path from the endpoint table below.
Find a model ID
List the models available for inference:data array. Copy the id of the model you want to use. Pass that exact value as model in requests, rather than the model’s display name.
Send a request
ReplaceMODEL_ID with an ID from the models response:
choices[0].message.content. To stream the response, add "stream": true to the request body and use curl -N to display events as they arrive. Streaming responses use server-sent events (SSE).
These shell examples use macOS/Linux quoting. On Windows, use curl.exe with quoting appropriate for your shell, or send the same JSON body from your application.
HTTP endpoints
All paths below are relative tohttp://127.0.0.1:10100.
For an Anthropic-compatible client that appends
/v1/messages, use http://127.0.0.1:10100/inference/anthropic as its base URL. Messages requests require max_tokens.
Supported inputs and features depend on the selected model. These endpoints provide local model inference; your application handles conversation history and executes any tools requested by the model.
Local access and troubleshooting
The API listens on the same machine as Magnitude.127.0.0.1 in a container or on another machine refers to that environment, not the machine running Magnitude. Direct LAN or internet access is not provided. Browser access is restricted to local origins; a page hosted on an external website cannot call the API directly through ordinary cross-origin requests.
- Connection refused: open Magnitude, or run
magnitude service startusing the bundled CLI. /healthworks but inference returns404: check the URL prefix. Use/inference/v1/chat/completions, not/v1/chat/completionsat the server root.- Model unavailable: download a model and copy its exact ID from
/inference/v1/models. - Slow first response: allow time for model loading, or load the model ahead of time in My Models.