Unload components, cached handles, or everything on a host (pins included)
const url = 'http://localhost:8300/v1/studio/admin/hosts/example/unload';const options = { method: 'POST', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"all":true,"entries":[{"env":"example","component":"example","model":"example","variant":"example","precision":"bf16","compute":"float32","loras":[{"lora_id":"example","strength":1}]}],"cached_env":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8300/v1/studio/admin/hosts/example/unload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "all": true, "entries": [ { "env": "example", "component": "example", "model": "example", "variant": "example", "precision": "bf16", "compute": "float32", "loras": [ { "lora_id": "example", "strength": 1 } ] } ], "cached_env": "example" }'Admin only (403). Studio sends req.runner.unload with by: admin to each env concerned: all = every env of the host, no components (everything: pinned components, adapters, cached handles); entries = one request per env with that env’s entries (pinned ones too; an entry not resident is skipped); cached_env = that env, cached_only. An env whose key is idle is asked at once; a busy one after its run ends (“a running run finishes first”): until every request of this call is answered, or 60 s after the host went idle, the dispatcher releases nothing to the host. Pins stay set. The result shows in GET /v1/studio/hosts. 404 for a host with no present hosts key. 422 env <env> is not on host <host>.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Unknown or malformed = 404)
Request Bodyrequired
Section titled “Request Bodyrequired”Exactly one of: all, entries (a component’s ×), cached_env (Cached handles ×)
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
Exactly one of: all, entries (a component’s ×), cached_env (Cached handles ×)
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
Exactly one of: all, entries (a component’s ×), cached_env (Cached handles ×)
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”Asked (or waiting for the run)
object
object
Asked: sent now; after_run: the env is busy and is asked when its run ends
Example
{ "requests": [ { "state": "asked" } ]}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"}