Skip to content

The Containers API provides endpoints for listing, creating, retrieving, updating, authorizing, and deleting container resources across your projects. Use these endpoints to manage container lifecycle, fetch real-time runtime and resource statistics, and issue offline-verifiable authorization claims for container programs.

Get all containers across all projects for the current user with pagination, filtering, and sorting. This endpoint provides a global view of all containers without being scoped to a specific project.

NameInTypeRequiredDescription
pagequerynumberNoPage number for pagination - starts from 1
limitquerynumberNoNumber of containers to return per page - maximum 100 items
sort_byquerystringNoField to sort containers by. Allowed values: id, name, status, created_at, updated_at
sort_orderquerystringNoSort direction - ascending or descending. Allowed values: asc, desc
realm_idquerystringNoFilter by realm ID. Only returns containers that belong to this realm. Alternative to using realm subdomain in URL.
runtimequerystringNoInclude live runtime information. Accepts “true”, “false”, or a URL-encoded JSON string like {"displays":true}. An empty JSON object {} fetches all info. Results are cached for 2 seconds to prevent abuse.
include_proxy_domainsquerystringNoInclude proxy domains (aliases) for each container. When true, adds a proxy_domains array to each container object. Allowed values: true, false
include_prespawnquerystringNoInclude prespawn containers in the listing. By default, prespawn containers are excluded from results. Allowed values: true, false
include_expiredquerystringNoInclude containers that have expired due to server termination. By default, expired containers are excluded from results. Allowed values: true, false
include_deletingquerystringNoInclude containers currently being deleted. By default, deleting containers are excluded from results. Allowed values: true, false
include_proxy_permissionsquerystringNoInclude the full proxy-permissions documents (container-level proxy_permissions and parent-project-level project_proxy_permissions) for each container. Returns proxy authentication group configuration including credentials — request only when explicitly needed. Auth tokens additionally require the resources.proxy_aliases permission.
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/containers/?page=1&limit=50&sort_by=created_at&sort_order=desc" \
-H "Authorization: Bearer <token>"

Get all containers for a specific project with pagination, filtering, and sorting.

NameInTypeRequiredDescription
idpathstringYesProject ID
pagequerynumberNoPage number for pagination
limitquerynumberNoNumber of containers to return per page
sort_byquerystringNoField to sort containers by. Allowed values: id, name, status, created_at, updated_at
sort_orderquerystringNoSort direction. Allowed values: asc, desc
runtimequerystringNoInclude live runtime information. Accepts “true”, “false”, or a URL-encoded JSON string like {"displays":true}. An empty JSON object {} fetches all info. Results are cached for 2 seconds to prevent abuse.
include_proxy_domainsquerystringNoInclude proxy domains (aliases) for each container. When true, adds a proxy_domains array to each container object. Allowed values: true, false
include_prespawnquerystringNoInclude prespawn containers in the listing. By default, prespawn containers are excluded. Allowed values: true, false
include_deletingquerystringNoInclude containers currently being deleted. By default, deleting containers are excluded from results. Allowed values: true, false
include_proxy_permissionsquerystringNoInclude the full proxy-permissions documents (container-level proxy_permissions and parent-project-level project_proxy_permissions) for each container. Returns proxy authentication group configuration including credentials — request only when explicitly needed. Auth tokens additionally require the resources.proxy_aliases permission.
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/projects/507f1f77bcf86cd799439011/containers?page=1&limit=20" \
-H "Authorization: Bearer <token>"

Retrieve a single container by its identifier, with optional live runtime information and proxy domain details.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to retrieve
runtimequerystringNoInclude live runtime information. Accepts “true”, “false”, or a URL-encoded JSON string like {"displays":true}. An empty JSON object {} fetches all info. Results are cached for 2 seconds to prevent abuse.
include_proxy_domainsquerystringNoInclude proxy domains (aliases) for this container. When true, adds a proxy_domains array to the container object. Allowed values: true, false
include_proxy_permissionsquerystringNoInclude the full proxy-permissions documents (container-level proxy_permissions and parent-project-level project_proxy_permissions) for each container. Returns proxy authentication group configuration including credentials — request only when explicitly needed. Auth tokens additionally require the resources.proxy_aliases permission.
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439011?include_proxy_domains=true" \
-H "Authorization: Bearer <token>"

Get real-time resource usage statistics for a container including CPU, memory, disk, and network metrics. Useful for monitoring performance and troubleshooting resource issues.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container
Terminal window
curl -X GET "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439011/stats" \
-H "Authorization: Bearer <token>"

Issues a signed, portable container authorization claim. The returned container_claim is an ED25519-signed credential that proves the user identity, the authorized container, and the issue time.

Container programs can verify this claim offline using Hoody’s public key at GET /api/v1/meta/public-key — no API round-trip is needed during verification. Claims expire after the configured expiry (default 1h); clients should re-call this endpoint to refresh before expiry.

NameInTypeRequiredDescription
idpathstringYesContainer ID (24-char hex)
Terminal window
curl -X POST "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439011/authorize" \
-H "Authorization: Bearer <token>"

Create a new container within a project. The container will be provisioned on the specified server.

NameInTypeRequiredDescription
idpathstringYesProject ID
FieldTypeRequiredDescription
server_idstringYesID of the server to host the container
namestringNoName for the container. Must be 3-100 characters, alphanumeric with hyphens and underscores. Omit or use “rand” to generate a random name.
colorstringNoHEX color for the container (e.g., #FF0000 or FF0000). If not provided, a random color will be generated. The # prefix will be added automatically if missing, and the color will be converted to uppercase.
container_imagestringNoContainer image to use. If null or not provided, will use the default configured image.
aibooleanNoWhether AI features are enabled. Default: true
environment_varsobjectNoEnvironment variables to set in the container. Keys must match ^[a-zA-Z_][a-zA-Z0-9_]*$. Max 200 properties, each value ≤ 65536 chars.
ssh_public_keystringNoSSH public key for container access. SSH public keys must be unique per container (one container per key). If not provided, will inherit from project defaults.
commentstringNoOptional comment for the container (max 16000 characters)
hoody_kitbooleanNoEnable all Hoody Kit features (extra-apt-sources, basic-packages, hoody-daemon, sudo-env, remove-snapd, webview, user, hoody-ai, ttyd). Default: true
dev_kitbooleanNoEnable dev_kit development tools in the container. Defaults to true when hoody_kit is true, false when hoody_kit is false (unless explicitly set). Cannot be updated after creation.
autostartbooleanNoWhether the container should start automatically on host boot. Default: true
ramdiskbooleanNoWhether to mount a ramdisk at /ramdisk in the container. Default: true
cachebooleanNoEnable use of cached images during container creation. Default: true
cache_imagebooleanNoForce the creation of a new cached image from the container image. Default: false
prespawnbooleanNoCreate container as prespawn cache. Prespawn containers are excluded from default listings and quota counts. Default: false
bypass_prespawnbooleanNoBypass prespawn container claiming and create a fresh container directly. Default: false
realm_idsarrayNoRealm IDs to assign this container to. Containers can have different realm membership than their parent project.
Terminal window
curl -X POST "https://api.hoody.icu/api/v1/projects/507f1f77bcf86cd799439011/containers" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"server_id": "507f1f77bcf86cd799439014",
"name": "backend-api",
"color": "#10B981",
"container_image": "ubuntu/22.04",
"ai": true,
"environment_vars": {
"DATABASE_URL": "postgresql://user:pass@db:5432/app",
"REDIS_URL": "redis://cache:6379"
},
"autostart": true,
"ramdisk": true
}'

Update mutable properties of an existing container. Only fields provided in the request body are modified.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to update
FieldTypeRequiredDescription
namestringNoHuman-readable name for the container - must be unique within the project. 1-100 characters.
colorstringNoHEX color for the container (e.g., #FF0000 or FF0000). The # prefix will be added automatically if missing, and the color will be converted to uppercase.
aibooleanNoWhether AI features are enabled. If omitted, the current value is preserved.
autostartbooleanNoWhether the container starts automatically on host boot. If omitted, the current value is preserved.
ramdiskbooleanNoWhether to mount a ramdisk at /ramdisk in the container. If omitted, the current value is preserved.
environment_varsobjectNoEnvironment variables to set in the container as key-value pairs. Max 200 properties.
ssh_public_keystring | nullNoSSH public key for container access. SSH public keys must be unique per container. Re-sending the same key is a no-op. Set to null to clear or inherit from project defaults.
commentstring | nullNoOptional comment for the container (max 16000 characters). Set to null to clear existing comment.
realm_idsarrayNoUpdate realm membership. Only unrestricted tokens and admin users can modify realm_ids.
Terminal window
curl -X PATCH "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "web-app-prod",
"color": "#10B981",
"ai": true,
"comment": "Updated production web app"
}'

Delete a container. The container will be marked for deletion and removed asynchronously.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to delete
Terminal window
curl -X DELETE "https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>"