Run Python
by Oblique Markets in Markets & finance
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.
https://api.oblique.markets/api/v1/paid/run-python- Price
- $0.05
- per call in USDC
- Uptime
- 97.3%
- last 30 days
- Response time
- 149 ms
- 410 ms slowest 5%
- Last check
- Passed
- 1 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.oblique.markets/api/v1/paid/run-python
Each call costs $0.05 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://api.oblique.markets/api/v1/paid/run-python
content-type: application/json
{
"code": "Python 3 program source, at most 32 KB.…"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
args | array of string | No | |
code | string | Yes | |
files | array of object | No | |
stdin | string | No | |
timeout_s | number | No |
Example response
The provider's example. We can't check it without paying.
Example response, 34 lines
{
"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
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.05.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.oblique.markets/api/v1/paid/run-python' \
-H 'content-type: application/json' \
--data-raw '{"code":"Python 3 program source, at most 32 KB.\u2026"}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://api.oblique.markets/api/v1/paid/run-python' \
-H 'content-type: application/json' \
--data-raw '{"code":"Python 3 program source, at most 32 KB.\u2026"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.05 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.05" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.05 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.oblique.markets%2Fapi%2Fv1%2Fpaid%2Frun-python&method=POST
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.\u2026"
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.05 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.05"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://api.oblique.markets/api/v1/paid/run-python",
json={
"code": "Python 3 program source, at most 32 KB.\u2026",
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 99 ms | $0.05 |
| 12 h ago | Passed | 402 | 47 ms | $0.05 |
| 22 h ago | Passed | 402 | 42 ms | $0.05 |
| 32 h ago | Passed | 402 | 368 ms | $0.05 |
| 2 days ago | Timed out | - | - | - |
Show 10 older checks
| 4 days ago | Timed out | - | - | - |
| 5 days ago | Passed | 402 | 123 ms | $0.05 |
| 6 days ago | Passed | 402 | 290 ms | $0.05 |
| 6 days ago | Passed | 402 | 175 ms | $0.05 |
| 6 days ago | Passed | 402 | 105 ms | $0.05 |
| 7 days ago | Passed | 402 | 120 ms | $0.05 |
| 7 days ago | Passed | 402 | 107 ms | $0.05 |
| 7 days ago | Passed | 402 | 407 ms | $0.05 |
| 8 days ago | Passed | 402 | 410 ms | $0.05 |
| 8 days ago | Passed | 402 | 161 ms | $0.05 |