SDKs & API
This page is the integration hub for VoidRun: packages to install, how to authenticate, how SDKs relate to the HTTP API, and where to go next. Use it together with the Quickstart and Code execution guides.Official SDKs
Both SDKs are generated from and aligned with the same OpenAPI description as the VoidRun service. For low-level request/response shapes, use the generated types in each package or the OpenAPI document shipped with the server.
Authentication
Authenticated endpoints expect your API key on every request:curl or custom HTTP clients. The official SDKs attach it for you when you configure an API key.
Environment variables
Typical configuration for the hosted VoidRun platform:
Both SDKs use the same packaged default API base URL as OpenAPI
servers (see API Reference) when you do not override it.
Self-hosted: set VR_API_URL or API_URL, or pass baseUrl / base_url=, to your deployment’s API root. See Self-hosted deployments.
Base URL and paths
- The base URL is the prefix for all REST routes (no trailing slash issues: follow the SDK README).
- Path segments (e.g.
/sandboxes,/sandboxes/{id}/exec) are defined in OpenAPI. Older examples sometimes used/v1or a different host; confirm the base URL in your dashboard or deployment docs.
REST API overview
- Contract: OpenAPI 3 describes sandboxes, execution, filesystem, PTY, background commands, watch endpoints, and error models.
- Success payloads often use a wrapper with a nested
dataobject; SDKs may unwrap one level for ergonomics (see below). - Errors: JSON bodies commonly include
erroranddetails. Log both when debugging; SDKs increasingly concatenate them into thrown error messages.
Interactive API Reference
This documentation site includes an API Reference tab generated from a bundled copy of the spec atdocs/openapi/voidrun.yml (synced from voidrun/openapi.yml in the monorepo: refresh the copy when the canonical spec changes). The spec’s servers entry (e.g. https://api.void-run.com/api) drives the API playground base URL.
Contributors: keep
docs/openapi/voidrun.yml in sync with voidrun/openapi.yml. MCP tools follow the same HTTP contract as REST; extend voidrun/openapi.yml, MCP handlers, and this site’s OpenAPI copy together when fields change. Branding: Mintlify maps logo.light to the navbar asset in dark UI and logo.dark in light UI (see Mintlify appearance and branding).Language SDK guides
Detailed sections (install, config, return shapes, filesystem, PTY, background commands, examples) live on dedicated pages. The npm/PyPI READMEs remain the long-form reference with every method variant. Create sandbox: full option tables forcreateSandbox / create_sandbox (defaults, types, REST mapping) are on the TypeScript and Python SDK pages. The authoritative HTTP schema is CreateSandboxRequest in the API Reference tab.
TypeScript SDK
@voidrun/sdk: ESM, exec + runCode, camelCase, packaged default base URL.Python SDK
voidrun: VoidRun / AsyncVoidRun, snake_case, same default base URL as TypeScript, VoidRunResponse / CodeExecutionResult.Quick comparison
Features implemented in SDKs
Short guides on this site (OpenAPI + SDK READMEs remain authoritative for every field):- PTY: interactive and persistent terminal sessions
- Background commands: run, list, attach streams, wait, kill
- File watching: live filesystem events over WebSocket
examples/ directories for copy-pastable patterns.
Related docs
VoidRun MCP
Cursor
mcp.json, Streamable HTTP URL, tools, resources, and agent troubleshooting.Examples
Detailed walkthroughs: interpreter, CI, ETL, PTY, file watch, list/cleanup, and more.
Quickstart
Install, auth env vars, and first sandbox end-to-end.
Code execution
Commands, interpreter, and execution concepts.
Shell execution
All shell and process paths in one place: sync, stream, background, PTY HTTP, CLI and REST.
Sandbox lifecycle
Run, pause, sleep, resume, and cleanup.
File system
Upload, download, and persistence inside a sandbox.

