82trust / 100

Run Python

by Oblique Markets in Markets & finance

x402 APIPassing, checked 4 h ago

Use when an agent needs run python. Returns Runs a short Python program in an isolated sandbox and returns its output: exit code, stdout/stderr (64 KB each), duration, up to 3 artifact files in ./out/, and a receipt. Python 3.12 with the standard library plus numpy, pandas and requests; no network; 512 MB; up to 30 s. Input: code (32 KB), optional stdin, args and up to 4 input files. Free syntax check: POST /api/v1/run-python/validate; worked example: GET /api/v1/run-python/example. $0.05.

POST https://api.oblique.markets/api/v1/paid/run-python

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
48 ms typical, 48 ms slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.oblique.markets/api/v1/paid/run-python" \
  -H "content-type: application/json" \
  -d '{"code":"Python 3 program source, at most 32 KB.…"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.oblique.markets%2Fapi%2Fv1%2Fpaid%2Frun-python
const res = await pay("https://api.oblique.markets/api/v1/paid/run-python", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"code":"Python 3 program source, at most 32 KB.…"}),
});
console.log(await res.json());

Example input

{
  "code": "Python 3 program source, at most 32 KB.…"
}

Example output

{
  "artifacts": [
    {
      "content_base64": "eyJuIjogNCwgIm1lYW4iOiA3LjI1fQ==",
      "name": "result.json",
      "size_bytes": 22
    }
  ],
  "duration_ms": 168,
  "exit_code": 0,
  "generated_at": "2026-09-09T00:31:12.000Z",
  "receipt": {
    "amount_atomic": "50000",
    "network": "eip155:8453",
    "payer": "0x1111111111111111111111111111111111111…",
    "payment_nonce": "0x7d1b2c3d4e5f60718293a4b5c6d7e8f90a1b2…",
    "payment_tx": "settled after this response; the transa…",
    "run_id": "run_5f0c2a9d7b3e1c4d8a6f0b21",
    "scheme": "exact"
  },
  "run_id": "run_5f0c2a9d7b3e1c4d8a6f0b21",
  "sandbox": {
    "memory_mb": 512,
    "network": false,
    "python_version": "3.12.10",
    "runtime": "isolated",
    "timeout_s": 10
  },
  "stderr": "",
  "stderr_truncated": false,
  "stdout": "mean 7.25\nargv ['--fast']\nnet blocked: …",
  "stdout_truncated": false,
  "timed_out": false
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed40248 ms$0.05