{"uid":"cap_k26x0Fot3VUI3ZC2WTt-S","slug":"gedx402-jobs-sandboxed-javascript-execution-322feb64","name":"GEDX402 Jobs – Sandboxed JavaScript Execution","description":"Async browser jobs, site crawl, rendered page markdown, screenshot, and PDF, document-to-JSON, document-to-Markdown, one-recipient email, and sandboxed JavaScript.","url":"https://jobs.gedx402.com/v1/code/run?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"code":{"type":"string"}}},"responseSchema":{"type":"json","example":{"body":"ok","status":200,"truncated":false,"content_type":"text/plain"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mUKii83vPjIU7FKFuTuYp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes a snippet of JavaScript code in a sandboxed environment and returns the result.","exampleAgentPrompt":"Run this JavaScript snippet for me in a sandbox and tell me what it outputs: `const arr = [1,2,3]; console.log(arr.reduce((a,b)=>a+b,0));`","exampleUseCases":[{"title":"Server-side formula evaluation","prompt":"I need you to evaluate this JavaScript expression server-side and give me the result: `Math.round(((3.14159 * Math.pow(5, 2)) * 10) / 10)`"},{"title":"Data transformation script","prompt":"Run this JavaScript for me: it takes a JSON string, parses it, filters items where quantity > 0, and returns the filtered list — `const data = [{name:'a',qty:1},{name:'b',qty:0}]; JSON.stringify(data.filter(x=>x.qty>0));`"},{"title":"Untrusted code testing","prompt":"Execute this user-submitted JavaScript snippet safely in a sandbox and show me what it outputs: `function fib(n){return n<=1?n:fib(n-1)+fib(n-2);} fib(10);`"}],"resultDescription":"Returns a JSON object containing the execution result body (as a string), an HTTP status code (200 on success), a boolean indicating whether the output was truncated, and the content type of the response.","failureModes":["Code with syntax errors may return a non-200 status and an error message in the body","Long-running or infinite loops may be terminated with a timeout error","Very large output may be truncated (truncated: true in response)","Unsupported Node/browser APIs not available in the sandbox will throw runtime errors","Malformed or missing 'code' parameter returns an error response"],"whenToPreferThis":"Choose this endpoint when you need to execute an arbitrary JavaScript snippet server-side in a secure, sandboxed environment without provisioning your own runtime. It is ideal for evaluating expressions, running data transformations, or testing logic snippets on demand at low cost ($0.01 per call) — especially when you do not need full browser rendering or page scraping (use sibling endpoints for those).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T07:02:46.103Z","isFirstParty":false,"canonicalSlug":"gedx402-jobs-sandboxed-javascript-execution-322feb64"}