{"uid":"cap_2bxiGgYUUkJc1tcXkbY7P","slug":"speccy-x402-sandbox-python-exec-5a61408b","name":"Speccy x402 — Sandbox Python Exec","description":"Run untrusted Python 3.12 code in an isolated Docker sandbox (no network, read-only FS, 0.5 CPU, 512MB RAM, 30s timeout). Returns stdout, stderr and exit code. Max code size 64KB.","url":"https://exec.speccy.cloud/v1/exec","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vEXaQAYyEr8_AOjSDBw3O","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs untrusted Python 3.12 code in an isolated Docker sandbox and returns stdout, stderr, and exit code","exampleAgentPrompt":"Run this Python 3.12 script in a secure sandbox and give me the stdout and exit code: `import math; print(math.factorial(20))`","exampleUseCases":[{"title":"LLM-generated code validation","prompt":"I want to verify the Python code snippet the LLM just generated actually produces the right answer — run `result = sum(range(1, 101)); print(result)` in a safe sandbox and tell me what stdout and exit code come back."},{"title":"Safe user-submitted script execution","prompt":"A user submitted this Python script to our platform: `data = [3,1,4,1,5,9]; print(sorted(data))` — run it in an isolated environment with no network access and return whatever it prints."},{"title":"Numeric computation offload","prompt":"Can you run this Python calculation for me in a sandboxed environment: `import numpy as np; arr = np.array([1,2,3,4,5]); print(np.mean(arr), np.std(arr))` and show me the output?"}],"resultDescription":"Returns HTTP response containing stdout (the text printed to standard output), stderr (any error messages or tracebacks), and the exit code of the Python process. Execution is capped at 30 seconds, 512MB RAM, 0.5 CPU, and 64KB code size.","failureModes":["Code exceeds 64KB size limit — request rejected","Execution times out after 30 seconds — process killed, partial or no stdout returned","Runtime error in user code — non-zero exit code with traceback in stderr","Out-of-memory error — process killed mid-execution","Network access attempted inside sandbox — connection refused (no network available)","Invalid or malformed request body — HTTP 4xx error"],"whenToPreferThis":"Use this endpoint when you need to safely execute arbitrary or untrusted Python 3.12 code without risking your own infrastructure — for example, running LLM-generated code, user-submitted scripts, or one-off computations. It is preferable to local execution when isolation, resource limits, and auditability matter. The $0.02 per-call pricing via x402 makes it suitable for on-demand, per-invocation workloads rather than high-throughput batch jobs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:36:33.229Z","isFirstParty":false}