82trust / 100

X402 Http Do Audit

by api.remix.live in Security & trust

x402 APIPassing, checked 3 h ago

Complete AI-powered smart contract security audit - analyzes code against checklist and provides detailed findings with severity levels. PRICING (based on model): DeepSeek: $0.15 USDC, Sonnet: $0.25 USDC, Fable: $0.70 USDC. Payment must match selected model.

POST https://api.remix.live/mcp/x402-http/do_audit

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
82 ms typical, 82 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.remix.live/mcp/x402-http/do_audit" \
  -H "content-type: application/json" \
  -d '{"checklist":"# Security Audit Checklist Report\n\n**Contract**: MyToken.sol\n\n## Summary\n\n- **ERC20::Token Mechanics** 🔴 `high`\n  - Inherits ERC20 and defines mint function\n\n...","model":"Sonnet","sources":{"MyToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract MyToken {\n    string public name = \"MyToken\";\n    mapping(address => uint256) public balances;\n\n    function mint(address to, uint256 amount) public {\n        balances[to] += amount;\n    }\n}"}}}'
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.remix.live%2Fmcp%2Fx402-http%2Fdo_audit
const res = await pay("https://api.remix.live/mcp/x402-http/do_audit", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"checklist":"# Security Audit Checklist Report\n\n**Contract**: MyToken.sol\n\n## Summary\n\n- **ERC20::Token Mechanics** 🔴 `high`\n  - Inherits ERC20 and defines mint function\n\n...","model":"Sonnet","sources":{"MyToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract MyToken {\n    string public name = \"MyToken\";\n    mapping(address => uint256) public balances;\n\n    function mint(address to, uint256 amount) public {\n        balances[to] += amount;\n    }\n}"}}}),
});
console.log(await res.json());

Example input

{
  "checklist": "# Security Audit Checklist Report\n\n**Contract**: MyToken.sol\n\n## Summary\n\n- **ERC20::Token Mechanics** 🔴 `high`\n  - Inherits ERC20 and defines mint function\n\n...",
  "model": "Sonnet",
  "sources": {
    "MyToken.sol": {
      "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract MyToken {\n    string public name = \"MyToken\";\n    mapping(address => uint256) public balances;\n\n    function mint(address to, uint256 amount) public {\n        balances[to] += amount;\n    }\n}"
    }
  }
}

Example output

{
  "findingsCount": 5,
  "markdown": "# Complete Security Audit Report\n\n**Contract**: MyToken.sol\n\n## Executive Summary\n\n...\n\n## Findings\n\n### High Severity\n\n...",
  "model": "openrouter/auto-beta",
  "severity": {
    "critical": 0,
    "high": 2,
    "informational": 0,
    "low": 1,
    "medium": 2
  },
  "success": true,
  "tokensUsed": 5678
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed40282 ms$0.25