Skip to content

SDK Setup

All AerolVM SDKs connect to the same REST API using a PAT token set during server installation. AerolVM also exposes compatibility facades for the Daytona SDK and E2B SDK, so existing clients can point at the same server without a rewrite.

VariableRequiredDescription
SB_PAT_TOKENYesThe token set with --pat-token during installation.
SB_API_URLNoServer base URL. Defaults to http://127.0.0.1:21212 if omitted.

AerolVM exposes a Daytona-compatible API under /daytona. Use the official Daytona SDK with your normal AerolVM PAT token and point its apiUrl at https://your-host/daytona.

See Using Daytona SDK for setup details and example code.

AerolVM also exposes an E2B-compatible control plane under /e2b and a runtime proxy under /e2b/runtime. Existing E2B SDK code usually only needs environment variable changes.

See Using E2B SDK for the required environment variables, examples, and current compatibility limits.

Terminal window
npm install @aerol-ai/aerolvm-sdk
import { MicroVM } from '@aerol-ai/aerolvm-sdk'
const client = new MicroVM({
apiUrl: process.env.SB_API_URL,
patToken: process.env.SB_PAT_TOKEN,
})
const sandbox = await client.create({ image: 'ubuntu:22.04' })
console.log(sandbox.publicUrl)
await sandbox.destroy()
Terminal window
pip install aerolvm-sdk
from microvm import MicroVM
client = MicroVM(
api_url='https://sandbox.example.com',
pat_token='your-token',
)
sandbox = client.create(image='ubuntu:22.04')
print(sandbox['public_url'])
sandbox.destroy()
Terminal window
go get github.com/aerol-ai/microvm/sdk/go/pkg/microvm@latest
import (
"os"
microvm "github.com/aerol-ai/microvm/sdk/go/pkg/microvm"
sdktypes "github.com/aerol-ai/microvm/sdk/go/pkg/types"
)
client, err := microvm.NewClientWithConfig(&sdktypes.MicroVMConfig{
PATToken: os.Getenv("SB_PAT_TOKEN"),
APIUrl: os.Getenv("SB_API_URL"),
})
sandbox, err := client.Create(ctx, microvm.CreateOptions{Image: "ubuntu:22.04"})
fmt.Println(sandbox.PublicURL)
defer client.Destroy(ctx, sandbox.ID)

Add the GitHub Packages repository and dependency to your pom.xml. See Server Setup for the GitHub token needed for read:packages.

import ai.aerol.microvm.MicroVMClient;
import ai.aerol.microvm.MicroVMConfig;
MicroVMClient client = new MicroVMClient(
new MicroVMConfig()
.setApiUrl("https://sandbox.example.com")
.setPatToken(System.getenv("SB_PAT_TOKEN"))
);
Terminal window
cargo add aerolvm-sdk
use aerolvm_sdk::Client;
let client = Client::new(
Some("https://sandbox.example.com"),
Some("your-token"),
)?;