Skip to main content

host

warning

Most developers should use the higher-level module APIs (entities, Vrm, audio, etc.) instead of calling the HTTP API directly. This module is for advanced use cases where no SDK wrapper exists yet.

Low-level HTTP client for direct access to the Desktop Homunculus engine API at localhost:3100. The host namespace is used internally by every other SDK module.

Import

import { host, HomunculusApiError, HomunculusStreamError } from "@hmcs/sdk";

Functions

FunctionDescription
configureOverride the base URL for the engine API
baseReturns the current base URL string
baseUrlReturns the current base URL as a URL object
createUrlBuild a full API URL with optional query parameters
getPerform a GET request
postPerform a POST request with JSON body
putPerform a PUT request with JSON body
patchPerform a PATCH request with JSON body
deleteMethodPerform a DELETE request
postStreamPOST and stream NDJSON response as an async generator