Renew Sandbox Expiration
POST
/v1/sandbox/{sandbox_id}/renew-expirationPOST
/v1/sandbox/{'{sandbox_id}'}/renew-expirationYour instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.
Description
Extends the idle timeout of a running sandbox by the specified number of seconds. This is useful for keeping a sandbox alive during long-running tasks or when an agent is idle but will resume shortly. The extension is added on top of the sandbox's current remaining lifetime.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sandbox_id | string | Yes | Sandbox ID or name |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
extra_seconds | integer | Yes | Number of additional seconds to add to the sandbox idle timeout |
Responses
200 Success
| Property | Type | Description |
|---|---|---|
status | string | Always "renewed" on success |
extra_seconds | integer | The number of seconds that were added to the sandbox timeout |
default An unexpected error response.
| Property | Type | Description |
|---|---|---|
code | integer | |
message | string | |
details | object[] |
Request
curl -X POST "https://your-instance.example.com/v1/sandbox/sb_abc123/renew-expiration" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"extra_seconds":3600}'const response = await fetch(
"https://your-instance.example.com/v1/sandbox/sb_abc123/renew-expiration",
{
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
extra_seconds: 3600,
}),
}
);
const data = await response.json();
console.log(data); // { status: "renewed", extra_seconds: 3600 }import requests
response = requests.post(
"https://your-instance.example.com/v1/sandbox/sb_abc123/renew-expiration",
headers={"Authorization": "Bearer <token>"},
json={"extra_seconds": 3600},
)
print(response.json()) # {"status": "renewed", "extra_seconds": 3600}Response
{"status": "renewed", "extra_seconds": 3600}{"code": 0, "message": "string", "details": [{"@type": "string"}]}
