Oblique Markets · Paid RUN Python

by Oblique Markets

POSTBaseSolana

$0.05

per call · USD Coin on Base

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 written to ./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 compile-only check at POST /api/v1/run-python/validate; worked example at GET /api/v1/run-python/exa

Endpoint

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

2

Calls / 30d

2

Unique payers / 30d

Sep 9

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("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. Runs as main.py in a"
  }),
});
const data = await res.json();
cURL
curl -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. Runs as main.py in a"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "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": "0x1111111111111111111111111111111111111111",
    "payment_nonce": "0x7d1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9",
    "payment_tx": "settled after this response; the transaction hash is in the PAYMENT-RESPONSE header",
    "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: URLError\n",
  "stdout_truncated": false,
  "timed_out": false
}

Payment details

Pay to0x970007590acc5c938cd51345b17af51b1b40d3ab
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from Oblique Markets & similar services