Skip to content
Alphahelmstudio is early software: things will change, and some will break.What's newReport an issue

Unload components, cached handles, or everything on a host (pins included)

POST
/v1/studio/admin/hosts/{host}/unload
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>.

host
required
string

Unknown or malformed = 404)

Media typeapplication/json
One of:

Exactly one of: all, entries (a component’s ×), cached_env (Cached handles ×)

object
all
required
boolean
entries
Array<object>
>= 1 items <= 64 items

One resident entry’s identity (registry $defs/pin): what a resident component of GET /v1/studio/hosts shows, with its entry’s env

object
env
required
string
/^[a-z0-9]{1,32}$/
component
required
string
/^[a-z][a-z0-9_]{0,63}$/
model
required
string
/^[a-z0-9][a-z0-9_.-]{0,63}$/
variant
required
string
/^[a-z0-9][a-z0-9_-]{0,63}$/
precision
required
string
Allowed values: bf16 fp16 int8 int4 fp8 fp32
compute

The entry’s compute as GET /v1/studio/hosts shows it; absent = float32

string
Allowed values: float32 float16
loras

A baked set, in order (lora_id and strength as the admin’s hosts view shows them); absent or empty = the plain component

Array<object>
<= 32 items
object
lora_id
required
string
/^([0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/
strength
required
number
cached_env
string
/^[a-z0-9]{1,32}$/

Asked (or waiting for the run)

Media typeapplication/json
object
host
required
string
requests
required
Array<object>
object
env
required
string
state
required

Asked: sent now; after_run: the env is busy and is asked when its run ends

string
Allowed values: asked after_run

Example

{
"requests": [
{
"state": "asked"
}
]
}

Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Valid token without the admin role: “admin role required”

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Not found

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Invalid input

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Retryable

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}