The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
BoxApi
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| create | POST /boxes | Create a box |
| destroy | POST /boxes/{boxId}/destroy | Destroy box |
| info | GET /boxes/{boxId} | Get box info |
| isRecoverable | POST /boxes/{boxId}/is-recoverable | Check if box error is recoverable |
| recover | POST /boxes/{boxId}/recover | Recover box from error state |
| start | POST /boxes/{boxId}/start | Start box |
| stop | POST /boxes/{boxId}/stop | Stop box |
| updateNetworkSettings | POST /boxes/{boxId}/network-settings | Update box network settings |
create
StartBoxResponse create(box)
Create a box
Example
import {
BoxApi,
Configuration,
CreateBoxDTO
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let box: CreateBoxDTO; //Create box
const { status, data } = await apiInstance.create(
box
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| box | CreateBoxDTO | Create box |
Return type
StartBoxResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
destroy
string destroy()
Destroy box
Example
import {
BoxApi,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let boxId: string; //Box ID (default to undefined)
const { status, data } = await apiInstance.destroy(
boxId
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| boxId | [string] | Box ID | defaults to undefined |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Box destroyed | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
info
BoxInfoResponse info()
Get box info
Example
import {
BoxApi,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let boxId: string; //Box ID (default to undefined)
const { status, data } = await apiInstance.info(
boxId
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| boxId | [string] | Box ID | defaults to undefined |
Return type
BoxInfoResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Box info | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
isRecoverable
IsRecoverableResponse isRecoverable(request)
Check if the box's error reason indicates a recoverable error
Example
import {
BoxApi,
Configuration,
IsRecoverableDTO
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let boxId: string; //Box ID (default to undefined)
let request: IsRecoverableDTO; //Error reason to check
const { status, data } = await apiInstance.isRecoverable(
boxId,
request
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| request | IsRecoverableDTO | Error reason to check | |
| boxId | [string] | Box ID | defaults to undefined |
Return type
IsRecoverableResponse
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
recover
string recover(recovery)
Recover box from error state using specified recovery type
Example
import {
BoxApi,
Configuration,
RecoverBoxDTO
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let boxId: string; //Box ID (default to undefined)
let recovery: RecoverBoxDTO; //Recovery parameters
const { status, data } = await apiInstance.recover(
boxId,
recovery
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| recovery | RecoverBoxDTO | Recovery parameters | |
| boxId | [string] | Box ID | defaults to undefined |
Return type
string
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Box recovered | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start
StartBoxResponse start()
Start box
Example
import {
BoxApi,
Configuration
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let boxId: string; //Box ID (default to undefined)
let token: string; //Auth token (optional) (default to undefined)
let metadata: object; //Metadata (optional)
const { status, data } = await apiInstance.start(
boxId,
token,
metadata
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| metadata | object | Metadata | |
| boxId | [string] | Box ID | defaults to undefined |
| token | [string] | Auth token | (optional) defaults to undefined |
Return type
StartBoxResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Box started | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
stop
string stop()
Stop box
Example
import {
BoxApi,
Configuration,
StopBoxDTO
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let boxId: string; //Box ID (default to undefined)
let box: StopBoxDTO; //Stop box (optional)
const { status, data } = await apiInstance.stop(
boxId,
box
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| box | StopBoxDTO | Stop box | |
| boxId | [string] | Box ID | defaults to undefined |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Box stopped | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateNetworkSettings
string updateNetworkSettings(box)
Update box network settings
Example
import {
BoxApi,
Configuration,
UpdateNetworkSettingsDTO
} from './api';
const configuration = new Configuration();
const apiInstance = new BoxApi(configuration);
let boxId: string; //Box ID (default to undefined)
let box: UpdateNetworkSettingsDTO; //Update network settings
const { status, data } = await apiInstance.updateNetworkSettings(
boxId,
box
);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| box | UpdateNetworkSettingsDTO | Update network settings | |
| boxId | [string] | Box ID | defaults to undefined |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Network settings updated | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]