const kinds = await api.hosts.kinds();
// [{ kind: "site", hostSuffix: "…", deploy: "files", available: true, reason: null }, …]
const usable = kinds.filter((k) => k.available);kinds = api.hosts.kinds()
# [{"kind": "site", "hostSuffix": "…", "deploy": "files", "available": True, "reason": None}, …]
usable = [k for k in kinds if k["available"]]kindstringThe identifier to pass to create().
hostSuffixstringThe address level this kind is served on.
deploystringWhat a deploy takes — files, or code.
availablebooleanWhether it can be created.
reasonstring|nullWhy not, when it cannot.
Why availability is a field
Never created « for now »: an address that does not answer reads as an outage. This list is what lets an interface show only what works, and say why about the rest — without the day it changes requiring a page to change.
Do not hardcode the suffix
One level per kind is deliberate — it is what stops a customer ever taking a name the platform itself answers for. The suffixes are returned here precisely so no page repeats them.
Building a picker
for (const k of await api.hosts.kinds()) {
render({ value: k.kind, label: k.kind, hint: k.hostSuffix, disabled: !k.available, why: k.reason });
}for k in api.hosts.kinds():
render(value=k["kind"], label=k["kind"], hint=k.get("hostSuffix"), disabled=not k["available"], why=k.get("reason"))