Skip to content
Fourohtwo

agent402.tools/api/code-run-pro

Execute Python or JavaScript code in a secure, isolated cloud sandbox (Pro tier). Same as /api/code-run but with 60s timeout and 50k char code limit for longer computations. Returns stdout, stderr, and the expression result. A run that hits the time limit is returned with timedOut: true and the output it printed, and is charged.

SolanaBaseDown
POSThttps://agent402.tools/api/code-run-pro

Uptime0.0% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/code-run-pro", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"code":"print('Hello from Agent402!')","language":"python"}),
});
console.log(await res.json());

Example input

{
  "code": "print('Hello from Agent402!')",
  "language": "python"
}