{"uid":"cap_SHSk-1DCTcrMTBVT5GUcj","slug":"echo-router-e2b-code-execution-8e319e57","name":"Echo Router – E2B Code Execution","description":"Executes code in secure sandboxed environments using E2B. Supports multiple programming languages with isolated execution and real-time output capture.","url":"https://echo.router.merit.systems/resource/e2b/execute","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"snippet":{"type":"string"}}},"responseSchema":{"cost":{"type":"number"},"logs":{"type":"object","required":["stdout","stderr"],"properties":{"stderr":{"type":"array","items":{"type":"string"}},"stdout":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"error":{"type":"object","required":["name","value","traceback"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"traceback":{"type":"string"}},"additionalProperties":false},"results":{"type":"array","items":{"type":"object","required":["isMainResult","raw"],"properties":{"pdf":{"type":"string"},"png":{"type":"string"},"raw":{"type":"object","additionalProperties":{}},"svg":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"html":{"type":"string"},"jpeg":{"type":"string"},"json":{"type":"string"},"text":{"type":"string"},"chart":{},"extra":{},"latex":{"type":"string"},"markdown":{"type":"string"},"javascript":{"type":"string"},"isMainResult":{"type":"boolean"}},"additionalProperties":false}},"duration":{"type":"number"},"sandboxId":{"type":"string"},"executionCount":{"type":"number"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.00028","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.00028/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.00028","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.00028","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8kdkQgrwGnFzDp72z4m2u","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.00028","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes arbitrary code snippets in secure, isolated E2B sandbox environments and returns stdout, stderr, results, and execution metadata","exampleAgentPrompt":"Run this Python snippet for me in a secure sandbox and show me what it prints: `import math; print(math.factorial(10))`","exampleUseCases":null,"resultDescription":"Returns an object containing stdout and stderr log arrays, an array of result objects (with optional text, HTML, PNG, SVG, PDF, JSON, chart, markdown, LaTeX, and JavaScript representations), an error object if execution failed (name, value, traceback), execution duration in milliseconds, sandbox ID, execution count, and cost incurred.","failureModes":["Syntax or runtime error in snippet — returns error object with name, value, and traceback; stdout/stderr may still contain partial output","Sandbox timeout — execution exceeds time limit, returns error with timeout traceback","Unsupported language or invalid snippet format — returns error indicating parse failure","Network or sandbox provisioning failure — HTTP 5xx error from the service","Payment failure or insufficient balance — HTTP 402 response blocking execution"],"whenToPreferThis":"Choose this endpoint when you need to safely execute arbitrary code snippets in an isolated, ephemeral sandbox without setting up a local environment. Ideal for running untrusted code, testing transformations, performing computations, or generating outputs (charts, PDFs, images) from code. Backed by E2B's proven sandboxing infrastructure, it is preferred over general LLM code interpretation when you need real, deterministic execution with actual stdout/stderr capture.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:42:42.801Z","isFirstParty":false}