API Reference · Workloads

Create a workload of a given type

Add a single resource. Each type has its **own body** — a VM body (`vm.*` fields) differs from a container-app body (`pod.*`) differs from a browser body — so the `{type}` path selects the shape. The body is `id` plus the fields for that type (see the per-type create schemas). Poll `/status` until it reaches its running phase.

POST/v1/tenants/{name}/workloads/{type}

Authorization

x-api-keystringrequired
Your per-workspace API key, e.g. llc_AbC123…. Also accepted as Authorization: Bearer <key>. Mint keys on your workspace's API keys page — each key belongs to one workspace.

Path parameters

namestringrequired
Workspace (tenant) name.
typeenumrequired
Workload type — selects which body shape is expected.

Body — CreateVM

Body for type vm-ubuntu / vm-ubuntu-desktop / vm-windows.

idstringrequired
e.g. dev-box
cpusintegeroptional
e.g. 2
memorystringoptional
e.g. 4Gi
storageSizestringoptional
e.g. 40Gi
credentialsobjectoptional
Required for a new VM (write-only).
portsarrayoptional
placementobjectoptional
Optional. Omitted = automatic (the default): LiveLLM picks the best host for the VM. Set it only when you need locality — a `region` to run on any of its hosts, or a pinned `host`. Regions, hosts and their live capacity come from `GET /v1/fleet/hosts`.
aiDaemonobjectoptional
Attach an AI agent that operates this VM over SSH — chat with it in the console or dispatch tasks via the task endpoints. `credentials` must be set on the same request the daemon is first enabled (the agent installs its SSH key using them, one-time).

Body — CreatePod

Body for type pod (container app). Set `image` or `source.repo`.

idstringrequired
e.g. web
imagestringoptional
e.g. nginx:1.27
commandarrayoptional
cpustringoptional
e.g. 500m
memorystringoptional
e.g. 512Mi
portsarrayoptional
sourceobjectoptional

Body — CreateBrowser

Body for type browser (headless Chromium).

idstringrequired
e.g. chrome
cpustringoptional
memorystringoptional

Body — CreateController

Body for type controller (browser automation API).

idstringrequired
e.g. ctrl
autodiscoverbooleanoptional

Body — CreateStorage

Body for type storage (managed database). `backup` is postgres-only. `credentials.password` is REQUIRED — you set it once and the platform never shows it again (stored write-only in a Secret, never on the workspace spec and never in a response). Username defaults to `app`.

idstringrequired
e.g. db-1
engineenumrequired
One of: postgres · redis.
versionstringoptional
e.g. 17
instancesenumoptional
One of: · .
storageSizestringoptional
e.g. 10Gi
cpustringoptional
e.g. 1
memorystringoptional
e.g. 1Gi
tlsbooleanoptional
adminConsolebooleanoptional
Attach a web admin console (pgAdmin for postgres, RedisInsight for redis) at `https://<id>-admin-<workspace>.cloud.live-llm.com`. Login is `admin` + your database password (HTTP basic-auth at the edge). The workload status reports `adminUrl` and `adminReady`.
networkobjectoptional
External-exposure config for a storage workload. When exposed, the endpoint is TLS + SNI-routed at `<id>.<workspace>.cloud.live-llm.com` — postgres on :5432 (`sslmode=require`), redis on :6380 (TLS).
credentialsobjectrequired
App login. Set the password once — it is never retrievable again.
backupobjectoptional

Response

202Accepted — the workload is being reconciled. Credentials are never echoed back: a storage password (like a VM password) is set once on create, stored write-only in a Secret, and never shown again.

tenantstring
statusstring
e.g. updated
curl -X POST https://api.live-llm.com/v1/tenants/acme/workloads/pod \
  -H "x-api-key: $LIVELLM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "web",
    "image": "nginx:1.27",
    "cpu": "500m",
    "memory": "512Mi",
    "ports": [
      {
        "name": "http",
        "port": 80
      }
    ]
  }'
Try itPOSThttps://api.live-llm.com/v1/tenants/{name}/workloads/{type}
Fill required path params: name, type.
Example response202
{
  "tenant": "acme",
  "status": "accepted"
}