Endpoint
Request
Headers
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Sandbox ID |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timeout_seconds | integer | Yes | New timeout duration in seconds from now |
Example Request
Set timeout to 1 hour (3600 seconds):Response
Success (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Sandbox ID |
timeout_seconds | integer | New timeout duration in seconds |
expires_at | string | ISO 8601 timestamp when sandbox will expire |
request_id | string | Request ID for debugging |
Status Codes
| Code | Description |
|---|---|
200 | Timeout updated successfully |
400 | Invalid timeout value |
401 | Authentication required |
404 | Sandbox not found |
Errors
Invalid Timeout (400)
timeout_seconds value is negative, zero, or invalid.
Fix: Ensure timeout_seconds is a positive integer.
Sandbox Not Found (404)
Important Notes
- Absolute timeout - The timeout is set from the current time, not relative to the previous timeout
- Auto-deletion - When the timeout expires, the sandbox is automatically deleted
- Can be extended - You can extend the timeout multiple times
- No maximum - There’s no maximum timeout limit (subject to your plan)
Use Cases
Extend Timeout for Long-Running Task
Set Timeout on Creation
Keep Sandbox Alive Indefinitely
Related
- SDK: sandbox.set_timeout() - Python SDK method
- CLI Reference - Command-line interface
Next Steps
- Get Sandbox - Check current timeout and expiration
- Create Sandbox - Set timeout on creation
- Delete Sandbox - Manually delete before timeout

