pending status and transitions to starting, then running as the VM boots. All fields are optional — omit them to accept the defaults (minimal template, 1 vCPU, 512 MiB RAM, no auto-pause).
Endpoint
Authentication
Pass your API key in theX-API-Key header. You can generate a key in the Wrenn dashboard.
Request body
Name of the base template or snapshot template to boot from. Defaults to
"minimal".Number of virtual CPUs to allocate to the capsule.
Memory to allocate, in MiB.
Inactivity TTL in seconds. The capsule is automatically paused after this many seconds with no exec calls or pings. Set to
0 to disable auto-pause.Example request body
Response
Returns a201 Created with the capsule object.
Unique capsule ID. Always prefixed with
cl- (e.g., "cl-abc123").Current lifecycle status. One of:
pending, starting, running, paused, stopped, error.Name of the template used to create the capsule.
Number of virtual CPUs allocated.
Memory allocated, in MiB.
Inactivity TTL in seconds.
0 means auto-pause is disabled.ISO 8601 timestamp of when the capsule was created.
ISO 8601 timestamp of the most recent status change.
ISO 8601 timestamp of when the capsule last reached
running status. null until the VM has booted at least once.ISO 8601 timestamp of the last exec call or ping. Used to calculate the auto-pause TTL.
Example response
curl
Python SDK
Pass
wait=True to block until the capsule reaches running status before your code continues. Without it, status will be "pending" or "starting" immediately after the call.Error responses
| Status | Code | Description |
|---|---|---|
401 Unauthorized | — | Missing or invalid X-API-Key. |
502 Bad Gateway | — | The host agent returned an error while provisioning the VM. Retry after a short delay. |