---
title: "Reload a llama-server-backed model"
method: POST
path: "/v1/models/reload"
tags: ["Engine"]
---

# Reload a llama-server-backed model

`POST /v1/models/reload`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/models/reload`
- Auth: HTTP bearer

Reloads the model bound to `configId` with a new context-window hint.
Used by the live config-apply path so a `contextWindowOverride` or
`modelId` edit on a local config is observed by the next chat turn.
Only applies to llama-server configs — cloud / Ollama / Apple configs
return 400. Body `n_ctx` overrides the stored ceiling for this reload.

## Request body

- object
  - `configId` string, required: EndpointConfig ID to reload
  - `n_ctx` integer: Context window size override for this reload (positive integer)

## Response `200`

Model reloaded

- object
  - `modelId` string, required
  - `ok` true, required

## Other responses

- `400`: Invalid request
- `404`: Configuration or model not resolvable
- `500`: Backend reload failed

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
