Get started in minutes with our Python and JavaScript SDKs. Full REST API available for any language.
Python
JavaScript
REST API
from vibengine import Sandbox, Template
sandbox = Sandbox.create(
template=Template.PYTHON_3_12,
region="ap-southeast-1",
cpu=2,
memory_mb=4096,
timeout_seconds=300
)
sandbox.run("pip install numpy pandas scikit-learn")
result = sandbox.run("python train_model.py --epochs 50")
for line in sandbox.stream("python benchmark.py"):
print(line)
sandbox.upload("./data.csv", "/workspace/data.csv")
sandbox.download("/workspace/model.pkl", "./output/")
snapshot_id = sandbox.snapshot()
sandbox.terminate()
import { Sandbox, Template } from '@vibengine/sdk';
const sandbox = await Sandbox.create({
template: Template.NODE_20_LTS,
region: 'ap-southeast-1',
cpu: 2,
memoryMb: 4096,
});
const result = await sandbox.run('npm install && npm test');
console.log(result.exitCode, result.stdout);
for await (const line of sandbox.stream('npm run build')) {
console.log(line);
}
await sandbox.upload('./src', '/workspace/src');
const output = await sandbox.download('/workspace/dist');
await sandbox.terminate();
$ curl -X POST https://api.vibengine.cloud/v1/sandboxes \
-H "Authorization: Bearer vb_sk_..." \
-H "Content-Type: application/json" \
-d '{
"template": "python-3.12",
"region": "ap-southeast-1",
"cpu": 2,
"memory_mb": 4096
}'
$ curl -X POST https://api.vibengine.cloud/v1/sandboxes/{id}/exec \
-H "Authorization: Bearer vb_sk_..." \
-d '{"command": "python analysis.py"}'
$ curl -N https://api.vibengine.cloud/v1/sandboxes/{id}/stream \
-H "Authorization: Bearer vb_sk_..."