{"uid":"cap_tdAYE22yjEQGxLJW-tOhY","slug":"verify402-sandbox-code-verification-4743eda6","name":"verify402 — Sandbox Code Verification","description":"Sandbox verification for AI agents: submit code + tests, get an executed pass/fail verdict with evidence. Pay per call via x402 (USDC on Base).","url":"https://verify402-production.up.railway.app/verify?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"code":{"type":"string","description":"The module under test (saved as code.py / code.js)"},"tests":{"type":"string","description":"Assertions importing the module; must exit non-zero on failure"},"language":{"enum":["python","node"],"type":"string","description":"Runtime for code + tests"}}},"responseSchema":{"type":"json","example":{"reason":"Alle Tests bestanden.","stderr":"","stdout":"OK\n","verdict":"pass","exitCode":0,"durationMs":250}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nk6XGk1LaKYjhnJE0ASWy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes submitted code and test assertions in an isolated sandbox and returns a pass/fail verdict with stdout, stderr, and exit code evidence.","exampleAgentPrompt":"Run this Python function and its pytest assertions in a sandbox and tell me if they pass — here's the code: `def add(a, b): return a + b` and the test: `from code import add; assert add(2, 3) == 5`.","exampleUseCases":[{"title":"Validate LLM-generated code before deployment","prompt":"I just had an AI write this Python utility function and some tests for it — can you run them in a sandbox and tell me if they actually pass before I merge anything?"},{"title":"Automated homework or coding challenge grading","prompt":"I have a student's Node.js submission and my reference test file — execute them together and give me the pass/fail verdict with any error output so I can grade it."},{"title":"CI smoke-test for a data transformation snippet","prompt":"Here's a small Python data-cleaning function and a set of assertions I wrote for it — run them and confirm everything exits cleanly, and show me stdout and stderr."}],"resultDescription":"A JSON object containing: `verdict` ('pass' or 'fail'), `reason` (human-readable explanation), `stdout` (captured standard output), `stderr` (captured error output), `exitCode` (process exit code, 0 for pass), and `durationMs` (execution time in milliseconds).","failureModes":["Code syntax errors cause a non-zero exit code and 'fail' verdict with stderr details","Test assertions that exit non-zero (e.g. AssertionError) return 'fail' with traceback in stderr","Unsupported language value returns validation error","Execution timeout for long-running code may return fail with timeout message","Missing required fields (code, tests, language) return HTTP 400","Payment failure via x402 (insufficient USDC balance) blocks the request before execution"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call code execution and test verification service without managing your own sandbox infrastructure. It is ideal for agents that generate code and need immediate correctness feedback, for grading pipelines, or for CI-style checks on small snippets in Python or Node.js. Prefer it over full CI/CD systems when you need a single fast verdict on a discrete code+test pair without setting up runners or credentials.","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":"verify402-sandbox-code-verification-4743eda6"}