Engine API reference

The engine exposes a local HTTP API on localhost:47990. Studio, the OS shell, and the CLI are all clients of it — anything they can do, your own code can do too.

Endpoints

The REST surface.

MethodPathDescription
GET/healthEngine liveness and version
GET/packagesList installed and available packages
POST/packages/:id/installInstall a package; returns a job id
DELETE/packages/:idUninstall a package and remove its files
POST/packages/:id/startLoad a model into memory
POST/packages/:id/stopUnload a model
POST/inferRun inference on a loaded model
GET/activityRecent jobs with status and timing
GET/activity/streamServer-sent events for live job progress
GET/hardwareDetected GPU, VRAM, RAM, and compatibility
GET/settingsRead engine settings
PATCH/settingsUpdate engine settings

Authentication

Bearer token.

The API binds to localhost and requires a bearer token, so other processes on your machine cannot drive the engine unless you hand them the token. Read it from the engine settings or the HUTASH_TOKEN environment variable.

request
curl -H "Authorization: Bearer $HUTASH_TOKEN" \ http://localhost:47990/health
response
{ "status": "ok", "version": "1.0.0", "models_loaded": 1 }

Inference

Running a job.

Inference is asynchronous: the call returns a job id, and progress arrives on the activity stream.

POST /infer
{ "package": "kokoro", "task": "tts", "input": { "text": "Welcome to Hutash", "voice": "heart" }, "out": "./welcome.wav" }
202 Accepted
{ "job_id": "j_8f2c41", "status": "queued", "position": 1 }