Skip to main content
Use this endpoint to restore a paused capsule from its snapshot. Wrenn boots a fresh Firecracker VM, loads the saved filesystem, and uses userfaultfd (UFFD) for lazy memory page loading so the capsule is ready to accept commands quickly. The capsule resumes exactly where it left off — running processes, in-memory state, and all.

Endpoint

POST https://app.wrenn.dev/api/v1/capsules/{id}/resume

Authentication

Pass your API key in the X-API-Key header.
X-API-Key: wrn_your_key

Path parameters

id
string
required
The ID of the capsule to resume (e.g., cl-abc123). The capsule must be in paused status.

Response

Returns 200 OK with the updated capsule object. The status field will be "running" once the VM has booted and the internal agent is ready.
id
string
required
Unique capsule ID, prefixed with cl-.
status
string
required
Will be "running" after the capsule has fully resumed.
template
string
required
Name of the template the capsule was created from.
vcpus
integer
required
Number of virtual CPUs allocated.
memory_mb
integer
required
Memory allocated, in MiB.
timeout_sec
integer
required
Inactivity TTL in seconds.
created_at
string
required
ISO 8601 timestamp of when the capsule was originally created.
last_updated
string
required
ISO 8601 timestamp of when the capsule last changed status.
started_at
string
ISO 8601 timestamp of when the capsule most recently reached running status.

Example response

{
  "id": "cl-abc123",
  "status": "running",
  "template": "base-python",
  "vcpus": 2,
  "memory_mb": 1024,
  "timeout_sec": 300,
  "created_at": "2024-11-01T10:00:00Z",
  "started_at": "2024-11-01T10:10:02Z",
  "last_active_at": "2024-11-01T10:10:02Z",
  "last_updated": "2024-11-01T10:10:02Z"
}

curl

curl --request POST \
  --url https://app.wrenn.dev/api/v1/capsules/cl-abc123/resume \
  --header 'X-API-Key: wrn_your_key'

Python SDK

The SDK handles resume transparently when you call Capsule.connect() on a paused capsule:
from wrenn import Capsule

# connect() automatically resumes a paused capsule
capsule = Capsule.connect("cl-abc123")
print(capsule.status)  # "running"
You can also resume explicitly on an existing instance:
capsule = Capsule.connect("cl-abc123")
capsule.pause()   # pause it first
capsule.resume()  # resume from the paused state
print(capsule.status)  # "running"

Error responses

StatusDescription
401 UnauthorizedMissing or invalid X-API-Key.
404 Not FoundNo capsule with the given ID exists in your team.
409 ConflictThe capsule is not in paused status. Only paused capsules can be resumed.