Base path:
/api/v1/control
These administrative APIs operate without authentication and accept cross-origin requests. They can download or delete models, compile code, and install drivers. Only use them on a trusted network.
| Method and path | Response |
|---|---|
GET /hardware |
List of HardwareInfo for all backends |
GET /diagnostics |
OS, JVM, CPU, RAM, swap, NPU, and inference metrics |
GET /logs?afterId=0 |
In-memory logs following the given ID |
Example:
curl http://localhost:8080/api/v1/control/hardware/diagnostics samples cumulative Linux counters: CPU and NPU values are meaningful between two consecutive readings, not as an absolute instantaneous measurement.
{
"enabled": false,
"modelLoaded": true
}Enables inference only if a model is loaded.
curl -X POST http://localhost:8080/api/v1/control/api/startDisables routes covered by the gate. Does not unload the model.
curl -X POST http://localhost:8080/api/v1/control/api/stopThe status is not persistent.
Parameters:
all=falsefor the auto-selected backend;all=truefor the entire catalog.
curl 'http://localhost:8080/api/v1/control/models?all=true'{
"modelId": "unsloth/Phi-4-mini-instruct-GGUF",
"quantization": "Q4_K_M"
}For unsloth/*, the quantization is validated. For other repositories, this field is ignored and the full repository is downloaded. The call starts an asynchronous task.
curl --get http://localhost:8080/api/v1/control/models/download/status \
--data-urlencode 'modelId=unsloth/Phi-4-mini-instruct-GGUF' \
--data-urlencode 'quantization=Q4_K_M'Response:
{
"modelId": "unsloth/Phi-4-mini-instruct-GGUF",
"quantization": "Q4_K_M",
"status": "DOWNLOADING",
"progress": 42.0,
"isDownloaded": false
}{
"modelId": "unsloth/Phi-4-mini-instruct-GGUF",
"preferredBackend": "ROCKCHIP",
"quantization": "Q4_K_M"
}The model must already be present on disk. The process supports only a single loaded model at a time; this endpoint does not automatically replace the currently active one.
The payload does not expose the context window size: the controller defaults to 4096. To load a different context size, the API contract must be extended and the four-argument overload of ModelManagementService.loadModel must be invoked.
No body required. Unloads the current model, but does not modify the API enabled flag.
Entire model:
{
"modelId": "OpenVINO/Phi-3.5-mini-instruct-int4-cw-ov"
}Single Rockchip variant:
{
"modelId": "unsloth/Phi-4-mini-instruct-GGUF",
"quantization": "Q4_K_M"
}Deletion is permanent. For a Rockchip variant, the model must first be unloaded. For an entire directory, the service automatically unloads any corresponding active model.
Returns in-memory settings plus:
configuredBackend;recommendedBackend;- effective
preferredBackend; backendSelectionMode;recommendationAvailable.
Accepts an arbitrary JSON object and merges it into the in-memory map:
{
"preferredBackend": "ROCKCHIP",
"modelsDirectory": "models",
"ollamaPort": 8080,
"defaultContextWindow": 4096
}There is no schema validation. Port, directory, and context settings do not reconfigure the active Spring beans. See Configuration and operation.
Starts the Intel Ubuntu 24.04 installation:
- downloads driver and Level Zero;
- extracts packages;
- invokes
pkexecandapt-get; - writes a udev rule;
- adds the user to the
rendergroup.
Task ID: intel-driver.
{
"workerType": "rocket"
}The value is used to resolve workers/<workerType>. Expected values: rocket, openvino, ryzenai.
For Rocket, the task updates llama.cpp, applies the patch, and compiles ggml-rocket as well. For other targets, it invokes the respective CMake build and requires the vendor SDK to be already installed.
Task ID: build-<workerType>.
Creates or reuses the project-local .modelscope-venv virtual environment and
installs ModelScope into it:
python3 -m venv .modelscope-venv
.modelscope-venv/bin/python -m pip install --upgrade modelscope
Task ID: modelscope-setup.
The current application downloader uses HTTP directly and does not require the ModelScope CLI; this setup option remains available for operational compatibility.
curl --get http://localhost:8080/api/v1/control/setup/status \
--data-urlencode 'taskId=build-rocket'{
"taskId": "build-rocket",
"status": "RUNNING",
"progress": 70.0
}Status and progress are process-local. A restart resets them. No cancellation endpoint is available.
Control endpoints generally return 400 for invalid input or state along with an object containing error. They do not share a strictly uniform error envelope.
Example:
{
"success": false,
"modelId": "example/model",
"error": "Model is already loaded"
}For Ollama/OpenAI API contracts, see API Compatibility.