{"uid":"cap_BA5t5brOA-1BaCelgA-z2","slug":"agent-exec-code-execution-sandbox-e90fb652","name":"agent-exec Code Execution Sandbox","description":"Accountless, pay-per-use code execution for software agents: submit source code, get stdout, stderr and exit code back from an isolated, network-less sandbox. No account, no API key -- possession of valid payment is sufficient.","url":"https://agent-exec.448c.net/execute?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["source","runtime"],"properties":{"files":{"type":"object","description":"Extra files seeded alongside the entry file, as relative-path -> content."},"stdin":{"type":"string","description":"Written to the payload's stdin, then stdin is closed."},"limits":{"type":"object","description":"Per-request resource budget. Every field is optional; an omitted field takes its documented default. A field outside [minimum, maximum] is rejected outright, never clamped."},"source":{"type":"string","description":"Program source, written to the runtime's entry file."},"runtime":{"enum":["python3","node"],"type":"string","description":"Must be one of the allowlisted runtimes named here -- this enum (and x-runtimes) is the free way to learn the set. An unsupported value is refused only AFTER a payment attempt, as RUNTIME_UNSUPPORTED, not before."}}},"responseSchema":{"type":"object","required":["outcome","stdout","stderr","exitCode","durationMs","truncated","error","payment","receipt"],"properties":{"error":{"type":["object","null"],"properties":{"code":{"enum":["SANDBOX_INVALID_REQUEST","RUNTIME_RESERVED_FILE_PATH","REQUEST_MALFORMED","PAYMENT_MALFORMED","RUNTIME_UNSUPPORTED","RUNTIME_LIMIT_OUT_OF_RANGE","SANDBOX_TIMEOUT","EXECUTION_MEMORY_LIMIT_EXCEEDED","EXECUTION_OUTPUT_LIMIT_EXCEEDED","SERVICE_BUSY","PAYER_RATE_LIMITED","PAYER_CONCURRENCY_LIMITED","EXECUTE_IP_RATE_LIMITED","EXECUTION_RUNTIME_ERROR","EXECUTION_RUNTIME_ERROR_POSSIBLE_SANDBOX_DENIAL","PAYMENT_INVALID","PAYMENT_AMOUNT_INSUFFICIENT","PAYMENT_REQUIREMENTS_MISMATCH","PAYMENT_REPLAYED","PAYMENT_SETTLEMENT_FAILED","PAYMENT_SETTLEMENT_INDETERMINATE","SANDBOX_UNAVAILABLE","SANDBOX_SETUP_FAILED","SERVICE_INTERNAL_FAILURE","PAYMENT_FACILITATOR_UNAVAILABLE"],"type":"string"},"message":{"type":"string"},"billable":{"type":"boolean"},"category":{"type":"string"}},"description":"Null when `outcome` is \"completed\"."},"stderr":{"type":"string"},"stdout":{"type":"string"},"outcome":{"enum":["completed","timeout","error"],"type":"string"},"payment":{"type":"object","properties":{"asset":{"type":"string"},"payer":{"type":"string","description":"The paying wallet's address."},"amount":{"type":"string","description":"Atomic units of the settlement asset that were charged."},"network":{"type":"string"},"transaction":{"type":"string","description":"On-chain settlement transaction hash."}},"description":"The payer is surfaced because it is this service's notion of identity (build.md: the wallet is the account) -- per-payer rate limits and standing are built on it."},"receipt":{"type":"object","required":["requestDigest","payment","priceUsd","price","tier","limits","usage","status","outputDigest"],"properties":{"tier":{"type":"string"},"price":{"type":"string","description":"The same amount as `priceUsd`, formatted as an x402 price string (e.g. \"$1.0000\")."},"usage":{"type":"object","required":["outcome","durationMs","exitCode","truncated"],"properties":{"outcome":{"enum":["completed","timeout","error"],"type":"string"},"exitCode":{"type":["integer","null"]},"truncated":{"type":"object","required":["stdout","stderr"],"properties":{"stderr":{"type":"boolean"},"stdout":{"type":"boolean"}}},"durationMs":{"type":"number"}}},"limits":{"type":"object","required":["timeoutMs","maxMemoryBytes","maxOutputBytes","workDirBytes"],"properties":{"timeoutMs":{"type":"number"},"workDirBytes":{"type":"number"},"maxMemoryBytes":{"type":"number"},"maxOutputBytes":{"type":"number"}},"description":"The purchased resource budget, normalized -- every field filled in, omitted request fields resolved to their documented default."},"status":{"type":"object","required":["code","category","billable"],"properties":{"code":{"enum":["SANDBOX_INVALID_REQUEST","RUNTIME_RESERVED_FILE_PATH","REQUEST_MALFORMED","PAYMENT_MALFORMED","RUNTIME_UNSUPPORTED","RUNTIME_LIMIT_OUT_OF_RANGE","SANDBOX_TIMEOUT","EXECUTION_MEMORY_LIMIT_EXCEEDED","EXECUTION_OUTPUT_LIMIT_EXCEEDED","SERVICE_BUSY","PAYER_RATE_LIMITED","PAYER_CONCURRENCY_LIMITED","EXECUTE_IP_RATE_LIMITED","EXECUTION_RUNTIME_ERROR","EXECUTION_RUNTIME_ERROR_POSSIBLE_SANDBOX_DENIAL","PAYMENT_INVALID","PAYMENT_AMOUNT_INSUFFICIENT","PAYMENT_REQUIREMENTS_MISMATCH","PAYMENT_REPLAYED","PAYMENT_SETTLEMENT_FAILED","PAYMENT_SETTLEMENT_INDETERMINATE","SANDBOX_UNAVAILABLE","SANDBOX_SETUP_FAILED","SERVICE_INTERNAL_FAILURE","PAYMENT_FACILITATOR_UNAVAILABLE",null],"type":["string","null"]},"billable":{"type":"boolean"},"category":{"enum":["invalid_request","unsupported_runtime","limit_out_of_range","timeout","memory_exceeded","output_limit_exceeded","service_busy","runtime_error","payment_required","settlement_failed","settlement_indeterminate","internal_failure","success"],"type":"string"}},"description":"From `classify()` -- the same wire taxonomy every error response already uses, rather than a receipt-local status string that could disagree with `error.category`."},"payment":{"type":"object","required":["payer","amount","asset","network","reference"],"properties":{"asset":{"type":"string"},"payer":{"type":"string","description":"The paying wallet's address."},"amount":{"type":"string","description":"Atomic units of the settlement asset that were charged."},"network":{"type":"string"},"reference":{"type":"string","description":"The facilitator's settlement transaction hash -- the on-chain reference for this payment."}}},"priceUsd":{"type":"number","description":"From `priceForLimits()` -- mechanically equal to what POST /quote returns for `limits`."},"outputDigest":{"type":"string","description":"A hash of exactly the fields returned as the run's result (`outcome`, `stdout`, `stderr`, `exitCode`, `truncated`) -- `durationMs` is deliberately excluded."},"requestDigest":{"type":"string","description":"sha256(rawBody) hex-encoded -- the exact bytes this request sent, hashed with nothing normalized or reinterpreted."}},"description":"Cryptographically binds this exact payment to this exact request and this exact output (src/receipts/receipt.ts) -- so the caller can recompute `requestDigest`/`outputDigest` itself without trusting this service's parsing, rather than a mere echo of what was already charged."},"exitCode":{"type":["integer","null"]},"truncated":{"type":"object","required":["stdout","stderr"],"properties":{"stderr":{"type":"boolean"},"stdout":{"type":"boolean"}}},"durationMs":{"type":"number"}},"description":"This route is paid on every call (POST /execute mounts no free path), so `payment` and `receipt` are always present alongside the run's own fields -- per src/runtime/types.ts's `ExecuteResult` plus what src/app.ts merges in once settlement succeeds."},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RY2eTtREZ2OpU2dT2crQJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Execute Python or Node.js source code in an isolated, network-less sandbox and return stdout, stderr, and exit code — billed per-use via x402 micropayment, no account required.","exampleAgentPrompt":"Run this Python 3 script for me in a sandboxed environment and tell me what it prints: `import math; print(math.factorial(20))`","exampleUseCases":[{"title":"Dynamic calculation inside agent workflow","prompt":"I need you to compute the nth Fibonacci number where n=50 — write and run a quick Python 3 script to figure it out and give me the answer."},{"title":"Validate generated code snippet","prompt":"I just wrote this Node.js snippet to parse a CSV string and extract the second column — can you run it in a sandbox and show me the stdout so I can verify it works?"},{"title":"Untrusted user code execution","prompt":"A user submitted this Python 3 script to process their data — run it in an isolated sandbox with no network access and return whatever it prints to stdout along with the exit code."}],"resultDescription":"Returns a JSON object with: outcome ('completed', 'timeout', or 'error'), stdout and stderr strings, exit code, execution duration in milliseconds, truncation flags, an error object (null on success with code, message, billable flag), payment details (payer wallet, amount, asset, network, transaction hash), and a receipt with price, tier, resource limits, usage stats, and output digest.","failureModes":["SANDBOX_TIMEOUT — code ran too long; no partial output","EXECUTION_MEMORY_LIMIT_EXCEEDED — program used more RAM than the budget allowed","RUNTIME_UNSUPPORTED — runtime value not in allowed enum (billed before rejection)","REQUEST_MALFORMED — missing required fields like source or runtime","PAYMENT_INVALID / PAYMENT_AMOUNT_INSUFFICIENT — x402 payment not accepted","PAYMENT_REPLAYED — same payment token submitted twice","PAYER_RATE_LIMITED / PAYER_CONCURRENCY_LIMITED — too many requests from this wallet","SERVICE_BUSY / SANDBOX_UNAVAILABLE — transient capacity issues","EXECUTION_OUTPUT_LIMIT_EXCEEDED — stdout/stderr too large","RUNTIME_RESERVED_FILE_PATH — a file path in the extra files map conflicts with a reserved path"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to execute arbitrary Python 3 or Node.js code dynamically without provisioning infrastructure, managing credentials, or creating an account. It is ideal for agent workflows that need to compute results programmatically, validate generated code, or run user-submitted scripts safely — all billed at $0.001 USDC per call via x402 micropayment, requiring only a funded wallet. Prefer it over cloud function platforms when you need zero-setup, per-call billing with no account lifecycle.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:40:24.609Z","isFirstParty":false,"canonicalSlug":"agent-exec-code-execution-sandbox-e90fb652"}