API Reference
Devbox
- The Devbox Object
- Devbox Lifecycle
- Devbox File Tools
- Devbox Shell Tools
- Devbox Network Tools
- Devbox Persistence Tools
- Devbox Observability Tools
- Devbox Add-ons
- Browser
- Computer
Blueprint
- The Blueprint Object
- Blueprint Lifecycle
- Blueprint Observability
Repository
- The Repository Object
- Repository Lifecycle
Code Scenario
- Code Scenario Lifecycle
- Scenarios Runs
- Custom Scenario Scorer
- Public Scenarios
Benchmark
- Benchmark Lifecycle
- Benchmark Runs
- Public Benchmarks
Get Computer Details.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
async function main() {
const computerView = await client.devboxes.computers.retrieve('id');
console.log(computerView.devbox);
}
main();
{
"devbox": {
"id": "<string>",
"name": "<string>",
"status": "provisioning",
"create_time_ms": 123,
"end_time_ms": 123,
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"metadata": {},
"failure_reason": "out_of_memory",
"shutdown_reason": "api_shutdown",
"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
},
"capabilities": [
"unknown"
]
},
"live_screen_url": "<string>"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The Computer ID
Response
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.
The ID of the Devbox.
The current status of the Devbox.
provisioning
, initializing
, running
, suspending
, suspended
, resuming
, failure
, shutdown
Creation time of the Devbox (Unix timestamp milliseconds).
The launch parameters used to create the Devbox.
Set of commands to be run at launch time, before the entrypoint process is run.
Manual resource configuration for Devbox. If not set, defaults will be used.
X_SMALL
, SMALL
, MEDIUM
, LARGE
, X_LARGE
, XX_LARGE
, CUSTOM_SIZE
Time in seconds after which Devbox will automatically shutdown. Default is 1 hour.
A list of ports to make available on the Devbox. Only ports made available will be surfaced to create tunnels via the 'createTunnel' API.
Configure Devbox lifecycle based on idle activity. If after_idle is set, Devbox will ignore keep_alive_time_seconds.
custom resource size, number of cpu cores, must be multiple of 2.
custom memory size, number in Gi, must be a multiple of 2.
A list of capability groups this devbox has access to. This allows devboxes to be compatible with certain tools sets like computer usage APIs.
unknown
, computer_usage
, browser_usage
, language_server
The name of the Devbox.
The time the Devbox finished execution (Unix timestamp milliseconds). Present if the Devbox is in a terminal state.
The Blueprint ID used in creation of the Devbox, if the devbox was created from a Blueprint.
The Snapshot ID used in creation of the Devbox, if the devbox was created from a Snapshot.
The failure reason if the Devbox failed, if the Devbox has a 'failure' status.
out_of_memory
, out_of_disk
, execution_failed
The shutdown reason if the Devbox shutdown, if the Devbox has a 'shutdown' status.
api_shutdown
, keep_alive_timeout
, entrypoint_exit
, idle
, lambda_lifecycle
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?
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
async function main() {
const computerView = await client.devboxes.computers.retrieve('id');
console.log(computerView.devbox);
}
main();
{
"devbox": {
"id": "<string>",
"name": "<string>",
"status": "provisioning",
"create_time_ms": 123,
"end_time_ms": 123,
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"metadata": {},
"failure_reason": "out_of_memory",
"shutdown_reason": "api_shutdown",
"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
},
"capabilities": [
"unknown"
]
},
"live_screen_url": "<string>"
}