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 devboxView = await client.devboxes.create();
console.log(devboxView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
devbox_view = client.devboxes.create()
print(devbox_view.id)curl --request POST \
--url https://api.runloop.ai/v1/devboxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"environment_variables": {},
"secrets": {},
"file_mounts": {},
"entrypoint": "<string>",
"blueprint_id": "<string>",
"blueprint_name": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"snapshot_id": "<string>",
"metadata": {},
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"git_ref": "<string>",
"token": "<string>"
}
],
"mounts": [
{
"object_id": "<string>",
"object_path": "<string>",
"type": "object_mount"
}
],
"tunnel": {
"http_keep_alive": true,
"wake_on_http": true
},
"gateways": {},
"mcp": {}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/devboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'environment_variables' => [
],
'secrets' => [
],
'file_mounts' => [
],
'entrypoint' => '<string>',
'blueprint_id' => '<string>',
'blueprint_name' => '<string>',
'launch_parameters' => [
'launch_commands' => [
'<string>'
],
'available_ports' => [
123
],
'keep_alive_time_seconds' => 123,
'after_idle' => [
'idle_time_seconds' => 123
],
'custom_cpu_cores' => 123,
'custom_gb_memory' => 123,
'custom_disk_size' => 123,
'user_parameters' => [
'username' => '<string>',
'uid' => 123
],
'required_services' => [
'<string>'
],
'network_policy_id' => '<string>',
'lifecycle' => [
'after_idle' => [
'idle_time_seconds' => 123
],
'resume_triggers' => [
'http' => true,
'axon_event' => true
],
'lifecycle_hooks' => [
'suspend_commands' => [
'<string>'
],
'suspend_deadline_ms' => 123
]
]
],
'snapshot_id' => '<string>',
'metadata' => [
],
'code_mounts' => [
[
'repo_name' => '<string>',
'repo_owner' => '<string>',
'install_command' => '<string>',
'git_ref' => '<string>',
'token' => '<string>'
]
],
'mounts' => [
[
'object_id' => '<string>',
'object_path' => '<string>',
'type' => 'object_mount'
]
],
'tunnel' => [
'http_keep_alive' => true,
'wake_on_http' => true
],
'gateways' => [
],
'mcp' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runloop.ai/v1/devboxes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"environment_variables\": {},\n \"secrets\": {},\n \"file_mounts\": {},\n \"entrypoint\": \"<string>\",\n \"blueprint_id\": \"<string>\",\n \"blueprint_name\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"snapshot_id\": \"<string>\",\n \"metadata\": {},\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"mounts\": [\n {\n \"object_id\": \"<string>\",\n \"object_path\": \"<string>\",\n \"type\": \"object_mount\"\n }\n ],\n \"tunnel\": {\n \"http_keep_alive\": true,\n \"wake_on_http\": true\n },\n \"gateways\": {},\n \"mcp\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runloop.ai/v1/devboxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"environment_variables\": {},\n \"secrets\": {},\n \"file_mounts\": {},\n \"entrypoint\": \"<string>\",\n \"blueprint_id\": \"<string>\",\n \"blueprint_name\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"snapshot_id\": \"<string>\",\n \"metadata\": {},\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"mounts\": [\n {\n \"object_id\": \"<string>\",\n \"object_path\": \"<string>\",\n \"type\": \"object_mount\"\n }\n ],\n \"tunnel\": {\n \"http_keep_alive\": true,\n \"wake_on_http\": true\n },\n \"gateways\": {},\n \"mcp\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/devboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"environment_variables\": {},\n \"secrets\": {},\n \"file_mounts\": {},\n \"entrypoint\": \"<string>\",\n \"blueprint_id\": \"<string>\",\n \"blueprint_name\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"snapshot_id\": \"<string>\",\n \"metadata\": {},\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"mounts\": [\n {\n \"object_id\": \"<string>\",\n \"object_path\": \"<string>\",\n \"type\": \"object_mount\"\n }\n ],\n \"tunnel\": {\n \"http_keep_alive\": true,\n \"wake_on_http\": true\n },\n \"gateways\": {},\n \"mcp\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "scheduled",
"create_time_ms": 123,
"end_time_ms": 123,
"metadata": {},
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"available_ports": [
123
],
"keep_alive_time_seconds": 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>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
},
"provisioning_tier": "standard"
},
"capabilities": [
"unknown"
],
"state_transitions": [
{
"status": "scheduled",
"transition_time_ms": {},
"failure_reason": "<string>"
}
],
"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,
"wake_on_http": true,
"auth_token": "<string>"
},
"gateway_specs": {},
"mcp_specs": {}
}Create a Devbox.
Create a Devbox and begin the boot process. Standard Devboxes initially report the ‘provisioning’ state. FLEX Devboxes initially report the ‘queued’ state while waiting for infrastructure allocation, then transition to ‘provisioning’ once assigned to a node. The Devbox transitions to ‘initializing’ while the booted Devbox runs Runloop or user-defined setup scripts, then to ‘running’ 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 devboxView = await client.devboxes.create();
console.log(devboxView.id);import os
from runloop_api_client import Runloop
client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
devbox_view = client.devboxes.create()
print(devbox_view.id)curl --request POST \
--url https://api.runloop.ai/v1/devboxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"environment_variables": {},
"secrets": {},
"file_mounts": {},
"entrypoint": "<string>",
"blueprint_id": "<string>",
"blueprint_name": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"available_ports": [
123
],
"keep_alive_time_seconds": 123,
"after_idle": {
"idle_time_seconds": 123
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"user_parameters": {
"username": "<string>",
"uid": 123
},
"required_services": [
"<string>"
],
"network_policy_id": "<string>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
}
},
"snapshot_id": "<string>",
"metadata": {},
"code_mounts": [
{
"repo_name": "<string>",
"repo_owner": "<string>",
"install_command": "<string>",
"git_ref": "<string>",
"token": "<string>"
}
],
"mounts": [
{
"object_id": "<string>",
"object_path": "<string>",
"type": "object_mount"
}
],
"tunnel": {
"http_keep_alive": true,
"wake_on_http": true
},
"gateways": {},
"mcp": {}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/devboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'environment_variables' => [
],
'secrets' => [
],
'file_mounts' => [
],
'entrypoint' => '<string>',
'blueprint_id' => '<string>',
'blueprint_name' => '<string>',
'launch_parameters' => [
'launch_commands' => [
'<string>'
],
'available_ports' => [
123
],
'keep_alive_time_seconds' => 123,
'after_idle' => [
'idle_time_seconds' => 123
],
'custom_cpu_cores' => 123,
'custom_gb_memory' => 123,
'custom_disk_size' => 123,
'user_parameters' => [
'username' => '<string>',
'uid' => 123
],
'required_services' => [
'<string>'
],
'network_policy_id' => '<string>',
'lifecycle' => [
'after_idle' => [
'idle_time_seconds' => 123
],
'resume_triggers' => [
'http' => true,
'axon_event' => true
],
'lifecycle_hooks' => [
'suspend_commands' => [
'<string>'
],
'suspend_deadline_ms' => 123
]
]
],
'snapshot_id' => '<string>',
'metadata' => [
],
'code_mounts' => [
[
'repo_name' => '<string>',
'repo_owner' => '<string>',
'install_command' => '<string>',
'git_ref' => '<string>',
'token' => '<string>'
]
],
'mounts' => [
[
'object_id' => '<string>',
'object_path' => '<string>',
'type' => 'object_mount'
]
],
'tunnel' => [
'http_keep_alive' => true,
'wake_on_http' => true
],
'gateways' => [
],
'mcp' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runloop.ai/v1/devboxes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"environment_variables\": {},\n \"secrets\": {},\n \"file_mounts\": {},\n \"entrypoint\": \"<string>\",\n \"blueprint_id\": \"<string>\",\n \"blueprint_name\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"snapshot_id\": \"<string>\",\n \"metadata\": {},\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"mounts\": [\n {\n \"object_id\": \"<string>\",\n \"object_path\": \"<string>\",\n \"type\": \"object_mount\"\n }\n ],\n \"tunnel\": {\n \"http_keep_alive\": true,\n \"wake_on_http\": true\n },\n \"gateways\": {},\n \"mcp\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runloop.ai/v1/devboxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"environment_variables\": {},\n \"secrets\": {},\n \"file_mounts\": {},\n \"entrypoint\": \"<string>\",\n \"blueprint_id\": \"<string>\",\n \"blueprint_name\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"snapshot_id\": \"<string>\",\n \"metadata\": {},\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"mounts\": [\n {\n \"object_id\": \"<string>\",\n \"object_path\": \"<string>\",\n \"type\": \"object_mount\"\n }\n ],\n \"tunnel\": {\n \"http_keep_alive\": true,\n \"wake_on_http\": true\n },\n \"gateways\": {},\n \"mcp\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runloop.ai/v1/devboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"environment_variables\": {},\n \"secrets\": {},\n \"file_mounts\": {},\n \"entrypoint\": \"<string>\",\n \"blueprint_id\": \"<string>\",\n \"blueprint_name\": \"<string>\",\n \"launch_parameters\": {\n \"launch_commands\": [\n \"<string>\"\n ],\n \"available_ports\": [\n 123\n ],\n \"keep_alive_time_seconds\": 123,\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"custom_cpu_cores\": 123,\n \"custom_gb_memory\": 123,\n \"custom_disk_size\": 123,\n \"user_parameters\": {\n \"username\": \"<string>\",\n \"uid\": 123\n },\n \"required_services\": [\n \"<string>\"\n ],\n \"network_policy_id\": \"<string>\",\n \"lifecycle\": {\n \"after_idle\": {\n \"idle_time_seconds\": 123\n },\n \"resume_triggers\": {\n \"http\": true,\n \"axon_event\": true\n },\n \"lifecycle_hooks\": {\n \"suspend_commands\": [\n \"<string>\"\n ],\n \"suspend_deadline_ms\": 123\n }\n }\n },\n \"snapshot_id\": \"<string>\",\n \"metadata\": {},\n \"code_mounts\": [\n {\n \"repo_name\": \"<string>\",\n \"repo_owner\": \"<string>\",\n \"install_command\": \"<string>\",\n \"git_ref\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"mounts\": [\n {\n \"object_id\": \"<string>\",\n \"object_path\": \"<string>\",\n \"type\": \"object_mount\"\n }\n ],\n \"tunnel\": {\n \"http_keep_alive\": true,\n \"wake_on_http\": true\n },\n \"gateways\": {},\n \"mcp\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "scheduled",
"create_time_ms": 123,
"end_time_ms": 123,
"metadata": {},
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"available_ports": [
123
],
"keep_alive_time_seconds": 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>",
"lifecycle": {
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"resume_triggers": {
"http": true,
"axon_event": true
},
"lifecycle_hooks": {
"suspend_commands": [
"<string>"
],
"suspend_deadline_ms": 123
}
},
"provisioning_tier": "standard"
},
"capabilities": [
"unknown"
],
"state_transitions": [
{
"status": "scheduled",
"transition_time_ms": {},
"failure_reason": "<string>"
}
],
"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,
"wake_on_http": true,
"auth_token": "<string>"
},
"gateway_specs": {},
"mcp_specs": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
(Optional) A user specified name to give the Devbox.
(Optional) Environment variables used to configure your Devbox.
Show child attributes
Show child attributes
(Optional) Map of environment variable names to secret names. The secret values will be securely injected as environment variables in the Devbox. Example: {"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the value of secret 'DATABASE_PASSWORD'.
Show child attributes
Show child attributes
Map of paths and file contents to write before setup. Use mounts instead.
Show child attributes
Show child attributes
(Optional) When specified, the Devbox will run this script as its main executable. The devbox lifecycle will be bound to entrypoint, shutting down when the process is complete.
Blueprint ID to use for the Devbox. If none set, the Devbox will be created with the default Runloop Devbox image. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified.
Name of Blueprint to use for the Devbox. When set, this will load the latest successfully built Blueprint with the given name. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified.
Parameters to configure the resources and launch time behavior of the Devbox.
Show child attributes
Show child attributes
Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified.
User defined metadata to attach to the devbox for organization.
Show child attributes
Show child attributes
A list of code mounts to be included in the Devbox. Use mounts instead.
Show child attributes
Show child attributes
A list of mounts to be included in the Devbox.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
(Optional) Configuration for creating a V2 tunnel at Devbox launch time. When specified, a tunnel will be automatically provisioned and the tunnel details will be included in the Devbox response.
Show child attributes
Show child attributes
(Optional) Agent gateway specifications for credential proxying. Map key is the environment variable prefix (e.g., 'GWS_ANTHROPIC'). The agent gateway will proxy requests to external APIs using the specified credential without exposing the real API key. Example: {'GWS_ANTHROPIC': {'gateway': 'anthropic', 'secret': 'my_claude_key'}}
Show child attributes
Show child attributes
[Beta] (Optional) MCP specifications for MCP server access. Map key is the environment variable name for the MCP token envelope. Each spec links an MCP config to a secret. The devbox will also receive RL_MCP_URL for the MCP hub endpoint. Example: {'MCP_SECRET': {'mcp_config': 'github-readonly', 'secret': 'MY_GITHUB_TOKEN'}}
Show child attributes
Show child attributes
Response
OK
A Devbox represents a virtual development environment. It is an isolated sandbox that can be given to agents and used to run arbitrary code such as AI generated code.
The ID of the Devbox.
The current status of the Devbox.
scheduled, queued, provisioning, initializing, running, suspending, suspended, resuming, failure, shutdown Creation time of the Devbox (Unix timestamp milliseconds).
The time the Devbox finished execution (Unix timestamp milliseconds). Present if the Devbox is in a terminal state.
The user defined Devbox metadata.
Show child attributes
Show child attributes
The launch parameters used to create the Devbox.
Show child attributes
Show child attributes
A list of capability groups this devbox has access to.
unknown, docker_in_docker A list of state transitions in order with durations
Show child attributes
Show child attributes
The name of the Devbox.
The type of initiator that created the Devbox.
unknown, api, scenario, scoring_validation, reflex The ID of the initiator that created the Devbox.
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, health_check_failed The shutdown reason if the Devbox shutdown, if the Devbox has a 'shutdown' status.
api_shutdown, keep_alive_timeout, entrypoint_exit, idle, ttl_expired V2 tunnel information if a tunnel was created at launch time or via the createTunnel API.
Show child attributes
Show child attributes
Gateway specifications configured for this devbox. Map key is the environment variable prefix (e.g., 'GWS_ANTHROPIC').
Show child attributes
Show child attributes
[Beta] MCP specifications configured for this devbox. Map key is the environment variable name for the MCP token envelope. Each spec links an MCP config to a secret for MCP server access through the MCP hub.
Show child attributes
Show child attributes
Was this page helpful?
