> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wrenn.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/capsules/{id} — Get capsule details

> GET /v1/capsules/{id} — Retrieve details for a specific capsule by ID. Returns status, template, resource allocation, and timestamps.

Use this endpoint to fetch the current state of a single capsule by its ID. This is useful for polling status after a create, pause, or resume call, or for inspecting resource allocation before running commands.

## Endpoint

```http theme={null}
GET https://app.wrenn.dev/api/v1/capsules/{id}
```

## Authentication

Pass your API key in the `X-API-Key` header.

```http theme={null}
X-API-Key: wrn_your_key
```

## Path parameters

<ParamField path="id" type="string" required>
  The capsule ID to retrieve (e.g., `cl-abc123`).
</ParamField>

## Response

Returns `200 OK` with the capsule object.

<ResponseField name="id" type="string" required>
  Unique capsule ID, prefixed with `cl-`.
</ResponseField>

<ResponseField name="status" type="string" required>
  Current lifecycle status. One of: `pending`, `starting`, `running`, `paused`, `stopped`, `error`.
</ResponseField>

<ResponseField name="template" type="string" required>
  Name of the template used to create the capsule.
</ResponseField>

<ResponseField name="vcpus" type="integer" required>
  Number of virtual CPUs allocated.
</ResponseField>

<ResponseField name="memory_mb" type="integer" required>
  Memory allocated, in MiB.
</ResponseField>

<ResponseField name="timeout_sec" type="integer" required>
  Inactivity TTL in seconds. `0` means auto-pause is disabled.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp of when the capsule was created.
</ResponseField>

<ResponseField name="last_updated" type="string" required>
  ISO 8601 timestamp of the most recent status change.
</ResponseField>

<ResponseField name="started_at" type="string">
  ISO 8601 timestamp of when the capsule last reached `running` status. `null` if the capsule has never booted.
</ResponseField>

<ResponseField name="last_active_at" type="string">
  ISO 8601 timestamp of the last exec call or ping.
</ResponseField>

### Example response

```json theme={null}
{
  "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:00:05Z",
  "last_active_at": "2024-11-01T10:04:30Z",
  "last_updated": "2024-11-01T10:00:05Z"
}
```

## curl

```bash theme={null}
curl --request GET \
  --url https://app.wrenn.dev/api/v1/capsules/cl-abc123 \
  --header 'X-API-Key: wrn_your_key'
```

## Python SDK

```python theme={null}
from wrenn import Capsule

# Fetch metadata by ID without attaching to the capsule
info = Capsule.get_info("cl-abc123")
print(info.status)    # "running"
print(info.template)  # "base-python"

# Or refresh metadata on an existing instance
capsule = Capsule.connect("cl-abc123")
info = capsule.get_info()
print(info.status)
```

## Error responses

| Status             | Description                                       |
| ------------------ | ------------------------------------------------- |
| `401 Unauthorized` | Missing or invalid `X-API-Key`.                   |
| `404 Not Found`    | No capsule with the given ID exists in your team. |
