Sandboxes
Create, retrieve, list, and delete cloud sandboxes.
Create Sandbox
POST /v1/sandboxes
Create a new cloud sandbox with specified resources.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Optional name for the sandbox. Defaults to auto-generated name. |
vcpu | number | No | Number of vCPUs (1-4). Defaults to 1. |
memory_mb | number | No | Memory in MB (512-8192). Defaults to 512. |
disk_gb | number | No | Disk size in GB (1-50). Defaults to 1. |
region | string | No | Region: eu-north or us-east. Defaults to eu-north. |
Example
curl -X POST https://api.conway.tech/v1/sandboxes \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "my-dev-sandbox",
"vcpu": 2,
"memory_mb": 2048,
"disk_gb": 10,
"region": "us-east"
}'const response = await fetch("https://api.conway.tech/v1/sandboxes", {
method: "POST",
headers: {
Authorization: "Bearer your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "my-dev-sandbox",
vcpu: 2,
memory_mb: 2048,
disk_gb: 10,
region: "us-east",
}),
});Response
{
"id": "abc123def456789012345678901234567890",
"short_id": "sbx-abc123",
"name": "my-dev-sandbox",
"status": "running",
"terminal_url": "https://sbx-abc123.life.conway.tech",
"vcpu": 2,
"memory_mb": 2048,
"disk_gb": 10,
"region": "us-east"
}Available Regions
| Region | Location | ID |
|---|---|---|
| EU North | Northern Europe | eu-north |
| US East | US East Coast | us-east |
Resource Limits
| Resource | Minimum | Maximum | Default |
|---|---|---|---|
| vCPU | 1 | 4 | 1 |
| Memory | 512 MB | 8192 MB | 512 MB |
| Disk | 1 GB | 50 GB | 1 GB |
Get Sandbox
GET /v1/sandboxes/:id
Retrieve a specific sandbox by its ID.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The sandbox ID |
Example
curl https://api.conway.tech/v1/sandboxes/sbx_abc123 \
-H "Authorization: Bearer your-api-key"const response = await fetch(
"https://api.conway.tech/v1/sandboxes/sbx_abc123",
{
headers: { Authorization: "Bearer your-api-key" },
}
);Response
{
"id": "sbx_abc123",
"status": "running",
"runtime": "python-3.11"
}List Sandboxes
GET /v1/sandboxes
Retrieve a list of all your sandboxes.
Example
curl https://api.conway.tech/v1/sandboxes \
-H "Authorization: Bearer your-api-key"const response = await fetch("https://api.conway.tech/v1/sandboxes", {
headers: { Authorization: "Bearer your-api-key" },
});Response
{
"data": [
{
"id": "sbx_abc123",
"status": "running",
"runtime": "python-3.11"
},
{
"id": "sbx_def456",
"status": "stopped",
"runtime": "nodejs-20"
}
]
}Delete Sandbox
DELETE /v1/sandboxes/:id
Delete a specific sandbox. This action is irreversible.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The sandbox ID to delete |
Example
curl -X DELETE https://api.conway.tech/v1/sandboxes/sbx_abc123 \
-H "Authorization: Bearer your-api-key"await fetch("https://api.conway.tech/v1/sandboxes/sbx_abc123", {
method: "DELETE",
headers: { Authorization: "Bearer your-api-key" },
});Response
Returns 204 No Content on success.