{"uid":"cap_6ztRbsPGbyc2GR7gWnpb_","slug":"e2b-sandbox-creation-4fccc667","name":"E2B Sandbox Creation","description":"POST /sandboxes","url":"https://e2b.x402.paysponge.com/sandboxes?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mcp":{"type":"object","nullable":true,"description":"MCP configuration for the sandbox","additionalProperties":{}},"secure":{"type":"boolean","description":"Secure all system communication with sandbox"},"envVars":{"additionalProperties":{"type":"string","description":"Environment variables for the sandbox"}},"network":{"type":"object","properties":{"denyOut":{"type":"array","items":{"type":"string"},"description":"List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules."},"allowOut":{"type":"array","items":{"type":"string"},"description":"List of allowed destinations for egress traffic. Each entry can be a CIDR block (e.g. \"8.8.8.8/32\"), a bare IP address (e.g. \"8.8.8.8\"), or a domain name (e.g. \"example.com\", \"*.example.com\"). Allowed entries always take precedence over denied entries."},"maskRequestHost":{"type":"string","description":"Specify host mask which will be used for all sandbox requests"},"allowPublicTraffic":{"type":"boolean","default":true,"description":"Specify if the sandbox URLs should be accessible only with authentication."}}},"timeout":{"type":"integer","format":"int32","default":15,"minimum":0,"description":"Time to live for the sandbox in seconds."},"metadata":{"additionalProperties":{"type":"string","description":"Metadata of the sandbox"}},"autoPause":{"type":"boolean","default":false,"description":"Automatically pauses the sandbox after the timeout"},"autoResume":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","default":false,"description":"Auto-resume enabled flag for paused sandboxes. Default false."}},"description":"Auto-resume configuration for paused sandboxes."},"templateID":{"type":"string","description":"Identifier of the required template"},"volumeMounts":{"type":"array","items":{"type":"object","required":["name","path"],"properties":{"name":{"type":"string","description":"Name of the volume"},"path":{"type":"string","description":"Path of the volume"}}}},"allow_internet_access":{"type":"boolean","description":"Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__zQQA4Oe7A46UnBYXZQ4e","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Spins up a new isolated cloud sandbox environment for safe AI agent code execution","exampleAgentPrompt":"Spin up a new E2B sandbox using the python-default template, with a 60-second timeout, auto-pause enabled, and block all outbound traffic except to api.openai.com.","exampleUseCases":[{"title":"AI agent code interpreter sandbox","prompt":"Create a secure E2B sandbox using the code-interpreter template with a 120-second timeout, auto-pause on, and set the ENV variable OPENAI_API_KEY to my key so the agent can safely run generated Python code."},{"title":"Restricted network sandbox for untrusted scripts","prompt":"Spin up an isolated E2B sandbox that denies all outbound traffic except to 8.8.8.8/32, with a 30-second timeout and no public access, so I can safely run user-submitted scripts."},{"title":"MCP-enabled sandbox for agentic workflow","prompt":"Launch a new E2B sandbox with MCP configuration enabled, a 90-second TTL, auto-resume turned on, and the environment variable DATABASE_URL set to my Postgres connection string for my automated data pipeline agent."}],"resultDescription":"Returns a sandbox object including a unique sandbox ID, access URL(s), status, and metadata for the newly created isolated execution environment. The agent can use this sandbox ID to interact with, monitor, or terminate the environment in subsequent API calls.","failureModes":["Invalid templateID returns a 404 or error indicating the template does not exist","Timeout value below minimum (0) causes a validation error","Malformed CIDR blocks in network deny/allow lists cause a 400 bad request","Insufficient payment or missing x402 payment header returns a 402 Payment Required","Network or provisioning failures may return a 500 or 503 error","Conflicting network rules (deny overridden by allow) may silently resolve without error"],"whenToPreferThis":"Choose this endpoint when you need to programmatically provision a fresh, isolated cloud sandbox for AI agent code execution, especially when you need fine-grained control over network egress, environment variables, lifecycle (timeout, auto-pause, auto-resume), or template selection. Prefer E2B over generic VMs when you want a purpose-built, agent-friendly sandbox API with per-call billing and MCP support.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:39:17.191Z","isFirstParty":false,"canonicalSlug":"e2b-sandbox-creation-4fccc667"}