import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const computerView = await client.devboxes.computers.create();
console.log(computerView.devbox);{
"devbox": {
"id": "<string>",
"status": "provisioning",
"create_time_ms": 123,
"end_time_ms": 123,
"metadata": {},
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"keep_alive_time_seconds": 123,
"available_ports": [
123
],
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"architecture": "x86_64",
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>"
},
"capabilities": [
"unknown"
],
"state_transitions": [
{
"status": "provisioning",
"transition_time_ms": {}
}
],
"name": "<string>",
"initiator_type": "unknown",
"initiator_id": "<string>",
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"failure_reason": "out_of_memory",
"shutdown_reason": "api_shutdown",
"tunnel": {
"tunnel_key": "<string>",
"auth_mode": "open",
"create_time_ms": 123,
"http_keep_alive": true,
"auth_token": "<string>"
},
"gateway_specs": {},
"mcp_specs": [
{
"mcp_config_id": "<string>",
"secret_id": "<string>"
}
]
},
"live_screen_url": "<string>"
}Create a Computer and begin the boot process. The Computer will initially launch in the ‘provisioning’ state while Runloop allocates the necessary infrastructure. It will transition to the ‘initializing’ state while the booted Computer runs any Runloop or user defined set up scripts. Finally, the Computer will transition to the ‘running’ state when it is ready for use.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const computerView = await client.devboxes.computers.create();
console.log(computerView.devbox);{
"devbox": {
"id": "<string>",
"status": "provisioning",
"create_time_ms": 123,
"end_time_ms": 123,
"metadata": {},
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"keep_alive_time_seconds": 123,
"available_ports": [
123
],
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"architecture": "x86_64",
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>"
},
"capabilities": [
"unknown"
],
"state_transitions": [
{
"status": "provisioning",
"transition_time_ms": {}
}
],
"name": "<string>",
"initiator_type": "unknown",
"initiator_id": "<string>",
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"failure_reason": "out_of_memory",
"shutdown_reason": "api_shutdown",
"tunnel": {
"tunnel_key": "<string>",
"auth_mode": "open",
"create_time_ms": 123,
"http_keep_alive": true,
"auth_token": "<string>"
},
"gateway_specs": {},
"mcp_specs": [
{
"mcp_config_id": "<string>",
"secret_id": "<string>"
}
]
},
"live_screen_url": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
OK
A Computer represents an implementation of Anthropic Computer usage on top of Devboxes. It includes the tunnel to the live screen and the underlying DevboxView.
The underlying devbox the computer setup is running on.
Show child attributes
The http tunnel to connect and view the live screen of the computer. You can control the interactivity of the browser by adding or removing 'view_only' query parameter. view_only=1 will allow interaction and view_only=0 will disable interaction.
Was this page helpful?