E2B

E2B Sandboxes API

The sandboxes API from E2B — 13 operation(s) for sandboxes.

GitHub OpenAPI
Business capability
IT Infrastructure Management BC-600.50

Operations 20

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /sandboxes List running sandboxes (legacy) · List sandboxes #
Ask an LLM
“Which sandboxes are running on the legacy /sandboxes endpoint?”
“Can I filter the older sandbox list by metadata?”
Tell an agent
List running sandboxes with the legacy endpoint.
List legacy sandboxes matching {metadata}.
POST /sandboxes Create a sandbox (legacy) · Create sandbox #
Ask an LLM
“How do I spin up a new sandbox from a template with the legacy endpoint?”
“Can the older sandbox create call allow internet access?”
Tell an agent
Create a sandbox from template {templateID} with the legacy endpoint.
Create legacy sandbox {templateID} with internet access {allow_internet_access}.
POST /v2/sandboxes Create a sandbox (v2) · Create sandbox (v2) #
Ask an LLM
“How do I create a sandbox from a template with the v2 endpoint?”
“Can I set a timeout and auto-pause when creating a sandbox?”
Tell an agent
Create a sandbox from template {templateID} using the v2 endpoint.
Create v2 sandbox {templateID} with timeout {timeout} and auto-pause {autoPause}.
GET /v2/sandboxes List sandboxes (v2) · List sandboxes (v2) #
Ask an LLM
“What sandboxes exist right now, newest first?”
“Can I list only paused or running sandboxes?”
Tell an agent
List all sandboxes.
List v2 sandboxes in state {state}.
GET /sandboxes/metrics Get metrics for several sandboxes · List sandbox metrics #
Ask an LLM
“What metrics are available for a batch of sandboxes?”
“Can I pull sandbox metrics for a list of IDs?”
Tell an agent
Get metrics for sandboxes {sandbox_ids}.
Show sandbox metrics for {sandbox_ids}.
GET /sandboxes/{sandboxID}/logs Get sandbox logs (legacy) · Get sandbox logs #
Ask an LLM
“How do I read the logs of a sandbox with the legacy endpoint?”
“Can I fetch legacy sandbox logs from a certain time?”
Tell an agent
Get legacy logs for sandbox {sandboxID}.
Fetch legacy sandbox {sandboxID} logs since {start}.
GET /v2/sandboxes/{sandboxID}/logs Get sandbox logs (v2) · Get sandbox logs (v2) #
Ask an LLM
“How do I read a sandbox's logs with the v2 endpoint?”
“Can I search v2 sandbox logs for a word or filter by level?”
Tell an agent
Get v2 logs for sandbox {sandboxID}.
Search v2 sandbox {sandboxID} logs for {search}.
GET /sandboxes/{sandboxID} Get a sandbox · Get sandbox #
Ask an LLM
“What are the details of one sandbox?”
“Can I look up a sandbox by its ID?”
Tell an agent
Get sandbox {sandboxID}.
Show the details of sandbox {sandboxID}.
DELETE /sandboxes/{sandboxID} Kill a sandbox · Delete sandbox #
Ask an LLM
“How do I stop and kill a sandbox?”
“Can I permanently delete a sandbox?”
Tell an agent destructive · confirm first
Kill sandbox {sandboxID}.
Delete the sandbox {sandboxID}.
GET /sandboxes/{sandboxID}/metrics Get sandbox metrics · Get sandbox metrics #
Ask an LLM
“What CPU and memory metrics does a sandbox have?”
“Can I get sandbox metrics for a time range?”
Tell an agent
Get metrics for sandbox {sandboxID}.
Show sandbox {sandboxID} metrics from {start} to {end}.
POST /sandboxes/{sandboxID}/pause Pause a sandbox · Pause sandbox #
Ask an LLM
“How do I pause a running sandbox?”
“Can I pause a sandbox and keep its memory state?”
Tell an agent
Pause sandbox {sandboxID}.
Pause sandbox {sandboxID} with memory {memory}.
POST /sandboxes/{sandboxID}/resume Resume a paused sandbox · Resume sandbox #
Ask an LLM
“How do I resume a paused sandbox?”
“Can I resume a sandbox with a new timeout?”
Tell an agent
Resume sandbox {sandboxID}.
Resume sandbox {sandboxID} with timeout {timeout}.
POST /sandboxes/{sandboxID}/fork Fork a sandbox · Fork sandbox #
Ask an LLM
“How do I duplicate a running sandbox into several new ones?”
“Can I fork a sandbox and set a timeout on each fork?”
Tell an agent
Fork sandbox {sandboxID}.
Fork sandbox {sandboxID} into {count} new sandboxes with timeout {timeout}.
POST /sandboxes/{sandboxID}/connect Connect to a sandbox (legacy) · Connect to sandbox #
Ask an LLM
“How do I connect to a sandbox and extend its lifetime with the legacy endpoint?”
“Does the older connect call resume a paused sandbox?”
Tell an agent
Connect to sandbox {sandboxID} and extend its lifetime by {timeout} seconds.
Legacy connect to sandbox {sandboxID} with memory {memory}.
POST /v2/sandboxes/{sandboxID}/connect Connect to a sandbox session · Connect sandbox (v2) #
Ask an LLM
“How do I connect to a sandbox over HTTP and keep it alive for a while?”
“Does connecting to a sandbox resume a paused one?”
Tell an agent
Connect to sandbox {sandboxID}.
Connect to sandbox {sandboxID} with a {timeout} second timeout.
POST /sandboxes/{sandboxID}/timeout Set a sandbox's timeout · Set sandbox timeout #
Ask an LLM
“How do I make a sandbox expire x seconds from now?”
“Does setting a sandbox timeout overwrite the previous TTL?”
Tell an agent
Set sandbox {sandboxID}'s timeout to {timeout} seconds.
Make sandbox {sandboxID} expire {timeout} seconds from now.
PUT /sandboxes/{sandboxID}/network Update a sandbox's network rules · Update sandbox network #
Ask an LLM
“How do I change a running sandbox's egress rules?”
“Can I allow or deny specific outbound IPs on a sandbox?”
Tell an agent
Update sandbox {sandboxID}'s network rules to allow {allowOut}.
Block {denyOut} outbound traffic on sandbox {sandboxID}.
POST /sandboxes/{sandboxID}/refreshes Extend a sandbox's lifetime · Refresh sandbox #
Ask an LLM
“How do I keep a sandbox alive longer without recreating it?”
“Can I refresh a sandbox by a set duration?”
Tell an agent
Refresh sandbox {sandboxID} for another {duration} seconds.
Extend sandbox {sandboxID}'s lifetime by {duration}.
POST /sandboxes/{sandboxID}/snapshots Create a snapshot of a sandbox · Create snapshot #
Ask an LLM
“How do I save a sandbox's current state as a snapshot?”
“Can I create a snapshot without saving memory?”
Tell an agent
Create a snapshot named {name} from sandbox {sandboxID}.
Snapshot sandbox {sandboxID} with memory {memory}.
GET /snapshots List team snapshots · List snapshots #
Ask an LLM
“What snapshots exist for my team?”
“Can I list only the snapshots from one sandbox?”
Tell an agent
List all team snapshots.
List snapshots for sandbox {sandboxID}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/e2b-dev:e2b-dev-sandboxes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

e2b-dev-sandboxes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: E2B Sandboxes API
  version: 0.1.0
  description: Complete E2B developer API. Platform endpoints are served on api.e2b.app. Sandbox endpoints (envd) are served on the shared sandbox host (sandbox.e2b.app); target a specific sandbox with the E2b-Sandbox-Id and E2b-Sandbox-Port headers.
servers:
- url: https://api.e2b.app
  description: E2B Platform API
security: []
tags:


# --- truncated at 32 KB (262 KB total) ---
# Full source: https://artifacts.apis.io/e2b-dev/openapi/e2b-dev-sandboxes-api-openapi.yml