Set a sandbox's timeout (E2B)
E2B's `POST /sandboxes/{sandboxID}/timeout`. The sandbox now ends `timeout` seconds from now (at least 1, at most the plan's limit), as `POST /v1/sandboxes/{sandbox_id}/timeout` sets it.
POST
/compat/e2b/sandboxes/{sandboxID}/timeout
E2B's `POST /sandboxes/{sandboxID}/timeout`. The sandbox now ends `timeout` seconds from now (at least 1, at most the plan's limit), as `POST /v1/sandboxes/{sandbox_id}/timeout` sets it.
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token)
Path Parameters
sandboxID
string
required
path
The sandbox, as `sbx-<ulid>` (the `sandboxID` of the create answer) or `sbx_<ulid>`.
Request Body required
application/jsontimeout
integer
REQUIRED
Seconds from now.
Responses
204
Set.
No response body
400
A malformed value, or an option B3OS cannot honor named in the message (`invalid_request`, `unsupported_option`).
401
Missing or invalid B3OS key in `X-API-KEY` (`unauthorized`).
404
No such live sandbox, template or file (`sandbox_not_found`, `template_not_found`, `file_not_found`).
curl -X POST 'https://beta-api.b3os.org/compat/e2b/sandboxes/string/timeout' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "timeout": 600}'
const response = await fetch('https://beta-api.b3os.org/compat/e2b/sandboxes/string/timeout', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "timeout": 600 })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/compat/e2b/sandboxes/string/timeout', headers=headers, json={ "timeout": 600})print(response.json())
400
Response
{ "code": 400, "message": "mcp is not supported by B3OS: run your MCP server as a process in the sandbox"}
API Playground
Try this endpoint
POST
/compat/e2b/sandboxes/{sandboxID}/timeout