Replace the host's model folders (priority order) and the folder downloads go to
const url = 'http://localhost:8300/v1/studio/admin/hosts/example/folders';const options = { method: 'PUT', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"folders":[{"path":"~/GenAI/models"}],"downloads":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8300/v1/studio/admin/hosts/example/folders \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "folders": [ { "path": "~/GenAI/models" } ], "downloads": 1 }'. Admin only (403). Replaces the list, version + 1, published like the settings. A model folder is loaded from the first connected folder of the list that has a complete copy. Paths are absolute or ~/…, no .., no duplicates. Studio first asks the host’s supervising runner (req.runner.folders.check, 5 s): 422 <path> is not a folder on <host> (not a directory now and not under /Volumes: a drive’s folder may be listed while unplugged), <path> is not writable on <host> (the downloads folder only; a read-only folder may be listed), downloads must be a connected folder; 422 paths must be absolute or start with ~/, <path> is listed twice, downloads must be an index of folders; 503 <host> is offline (no runner answered). A first PUT creates the row with the other settings copied from the freshest key’s policy. 404 for a host with no present hosts key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Unknown or malformed = 404)
Request Bodyrequired
Section titled “Request Bodyrequired”The whole list, first = loaded first
object
object
The index in folders of the folder downloads go to
Responses
Section titled “Responses”The settings
object
What stays loaded once a run ends: unload = nothing (the board’s Unload everything); keep_warm = everything until memory is needed or the idle timeout passes (the default); keep_pinned = only the pins
Auto = the macOS GPU limit when set (at most RAM − 4 GB), else device memory − RUNNER_RESERVE_GB; custom = device memory − reserve_gb (the default). Absent = custom (a PUT: unchanged)
One resident entry’s identity (registry $defs/pin): what a resident component of GET /v1/studio/hosts shows, with its entry’s env
object
The entry’s compute as GET /v1/studio/hosts shows it; absent = float32
A baked set, in order (lora_id and strength as the admin’s hosts view shows them); absent or empty = the plain component
object
object
A model folder’s id, the first 12 hex of the SHA-256 of its path as stored
Every fresh hosts key of the host (but a local server’s server env, which holds no weights) reports policy.settings_version = version
Example
{ "after_run": "unload", "reserve_mode": "auto", "pins": [ { "precision": "bf16", "compute": "float32" } ]}Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token
object
Example generated
{ "detail": "example"}Valid token without the admin role: “admin role required”
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}