Replace the host's pinned components
const url = 'http://localhost:8300/v1/studio/admin/hosts/example/pins';const options = { method: 'PUT', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"pins":[{"env":"example","component":"example","model":"example","variant":"example","precision":"bf16","compute":"float32","loras":[{"lora_id":"example","strength":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/pins \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "pins": [ { "env": "example", "component": "example", "model": "example", "variant": "example", "precision": "bf16", "compute": "float32", "loras": [ { "lora_id": "example", "strength": 1 } ] } ] }'Admin only (403). Replaces the pins (duplicates collapsed), version + 1, published like the settings. A first PUT creates the row with the other settings copied from the freshest key’s policy. A pin keeps its entry loaded (keep_pinned, the idle unload) and is a hand-over victim only as the last resort (after every unpinned one, when the run would not fit otherwise: a pin never fails or holds a run; Run.unloads_pinned says so first); an admin unload still unloads it. An unloaded pin stays set. A pin need not be resident now. 404 for a host with no present hosts key. 422 env <env> is not on host <host>, <model> is not published by <host>.<env>.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Unknown or malformed = 404)
Request Bodyrequired
Section titled “Request Bodyrequired”object
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
Responses
Section titled “Responses”The settings
object
What stays loaded once a run ends: unload = nothing; 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
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"}