Skip to main content
Complete reference for BoxLite APIs, configuration, and error handling.

SDK API References

Complete API documentation for each SDK:

Python SDK

Async and sync APIs, box types, code execution, metrics. Python 3.10+.

Node.js SDK

TypeScript definitions, box types, CDP endpoints for browser automation.

Rust SDK

Core runtime, stream APIs, security options. Native performance.

C SDK

FFI bindings, JSON API, callback streaming for system-level integration.

Quick Reference

Python API

For complete Python API documentation, see Python API Reference. Key Classes:

Node.js API

For complete Node.js API documentation, see Node.js API Reference. Key Classes:

Rust API

For complete Rust API documentation, see Rust API Reference. Core Types:

C API

For complete C API documentation, see C API Reference. Functions:

SDK Feature Comparison

Configuration Reference

For complete BoxOptions parameter documentation, see the SDK-specific pages:

Runtime Options

home_dir: str

Base directory for BoxLite runtime data. Default: ~/.boxlite Override: Set BOXLITE_HOME environment variable Structure:

Environment Variables

Error Codes & Handling

For detailed error types and handling patterns, see the SDK-specific error pages:

File Formats

QCOW2 Disk Images

BoxLite uses QCOW2 (QEMU Copy-On-Write version 2) for persistent disks. Location: ~/.boxlite/boxes/{box-id}/disk.qcow2 Features:
  • Thin provisioning (sparse allocation)
  • Copy-on-write snapshots
  • Compression support
Tools:

OCI Image Cache

BoxLite caches OCI images at the layer level for fast starts. Location: ~/.boxlite/images/ Structure:
Blob-level deduplication across images means shared base layers (e.g., python:3.11 and python:3.12) are stored only once.
Clearing Cache:

Box Configuration

Box metadata and state are stored as JSON. Location: ~/.boxlite/boxes/{box-id}/config.json Example:
Do not manually edit box configuration files. They are managed by BoxLite and manual changes may cause unexpected behavior.

SQLite Databases

BoxLite uses SQLite for metadata persistence. Locations:
  • ~/.boxlite/db/boxes.db - Box registry and metadata
  • ~/.boxlite/db/images.db - Image cache index
Tools:
Do not manually modify the SQLite databases. Data corruption may result. Corruption recovery: delete and recreate from box config files.