82trust / 100
Static
by Python Code Validator in Developer tools
x402 APIPassing, checked 3 h ago
Check Python for syntax errors, lint and type mistakes, unsafe constructs and hardcoded credentials, and against the examples the caller supplies, without running it.
POST https://api.statemind.ai/v1/x402/static
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 155 ms typical, 155 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.statemind.ai/v1/x402/static" \
-H "content-type: application/json" \
-d '{"code":"def bitcount(n):\n count = 0\n while n:\n n ^= n - 1\n return count\n","options":{"examples":"assert bitcount(127) == 7\nassert bitcount(0) == 0"}}'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.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.statemind.ai%2Fv1%2Fx402%2Fstatic
const res = await pay("https://api.statemind.ai/v1/x402/static", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"code":"def bitcount(n):\n count = 0\n while n:\n n ^= n - 1\n return count\n","options":{"examples":"assert bitcount(127) == 7\nassert bitcount(0) == 0"}}),
});
console.log(await res.json());Example input
{
"code": "def bitcount(n):\n count = 0\n while n:\n n ^= n - 1\n return count\n",
"options": {
"examples": "assert bitcount(127) == 7\nassert bitcount(0) == 0"
}
}Example output
{
"diagnostics": [
{
"code": "python:example-mismatch",
"message": "assert bitcount(127) == 7 failed: the code loops forever",
"severity": "error"
}
],
"fixed_code": "def bitcount(n):\n count = 0\n while n:\n n &= n - 1\n count += 1\n return count\n",
"score": 0.4,
"valid": false
}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 |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 155 ms | $0.01 |