Unload model from memory
Unloads the selected model from memory
- Parameters
- Advanced call ?
Function UnloadModelFromMemory(Val URL, Val Model, Val AdditionalHeaders = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | Ollama server URL |
| Model | --model | String | ✔ | Models name |
| AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns
Map Of KeyAndValue - Processing result
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete structure with fields code, body, and headers |
tip
Method at API documentation: Unload a model
1C:Enterprise/OneScript code example
URL = "https://hut.openintegrations.dev/ollama";
Token = "12We34..."; // Authorization - not part API Ollama
Model = "tinyllama";
AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));
Result = OPI_Ollama.UnloadModelFromMemory(URL, Model, AdditionalHeaders);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint ollama UnloadModelFromMemory \
--url "https://hut.openintegrations.dev/ollama" \
--model "tinyllama" \
--headers "{'Authorization':'***'}"
:: JSON data can also be passed as a path to a .json file
oint ollama UnloadModelFromMemory ^
--url "https://hut.openintegrations.dev/ollama" ^
--model "tinyllama" ^
--headers "{'Authorization':'***'}"
Result
{
"model": "tinyllama",
"created_at": "2026-05-02T12:30:26.7317215Z",
"response": "",
"done": true,
"done_reason": "unload"
}