Skip to free scan

A Smart Contract Security API AI Agents Can Pay For With x402

Firepan Security TeamOctober 29, 2026

Short answer: Firepan's x402 Agent API lets an AI agent pay for smart contract security work per call, with no account, OAuth, or API key. An agent can buy a scan of a public GitHub repository for $0.50 or a deeper audit for $5.00, paid in USDC on Base through the x402 protocol. The server answers an unpaid request with HTTP 402 and the payment terms; the agent's x402 client pays and retries, and the response includes a job-scoped access token for reading results.

What x402 Is

x402 is an open standard for internet-native payments built on the HTTP 402 Payment Required status code. When a request arrives without payment, the server returns 402 with machine-readable terms (network, asset, amount, and payee). A client that supports x402 pays and retries the same request. Because payment happens inside the HTTP exchange, an autonomous agent can buy a service without a human creating an account first.

Firepan's Agent Endpoints

EndpointWhat it doesPricePayment
POST https://api.firepan.com/agent/surface-scanScan of a public Solidity or Vyper GitHub repository$0.50USDC on Base (eip155:8453)
POST https://api.firepan.com/agent/auditsDeeper asynchronous audit of a public repository$5.00USDC on Base (eip155:8453)
POST https://api.firepan.com/surface/scanFree scan of a public repositoryFreeNone

Read the current payment terms before paying. The discovery document is public:

curl -sS https://api.firepan.com/.well-known/x402

It lists each paid resource with its network, USDC asset address, atomic amount (500000 for the scan, 5000000 for the audit), payee, and timeout, plus the result-token and idempotency header names.

How the Payment Flow Works

  1. Discover terms. Fetch /.well-known/x402 and constrain the network, asset, payee, and maximum amount your agent will accept.
  2. Send the request. POST a body naming a public repository exactly as https://github.com/OWNER/REPO, with an Idempotency-Key header of up to 255 characters.
  3. Pay on 402. Let a stock x402 v2 client handle the PAYMENT-REQUIRED, PAYMENT-SIGNATURE, and PAYMENT-RESPONSE headers. Firepan's skill specifies @x402/fetch and @x402/evm 2.25.0; do not hand-build payment headers.
  4. Keep the access token. A successful response returns X-Firepan-Access-Token, a Bearer capability scoped to that one job. It is not a login token.
  5. Read results. For an audit, poll GET /agent/audits/{session_id}/status with that token, then read /findings and /report for the same session.

If a request fails after an uncertain charge, retry the exact same body with the same Idempotency-Key rather than paying again. A 409 means the key was reused with a different body or the request is already in progress.

What an Agent Gets Back

A scan returns structured findings, each with a detector pattern_id, title, severity (critical, high, medium, or low), category, confidence from 0 to 1, location, code_snippet, description, and whether an LLM verified it. Responses also include a risk score and level, contracts scanned, and a summary. Unsupported or incomplete analysis comes back as inconclusive with a null risk score, so an agent should never present missing coverage as a clean result.

An audit returns a session_id immediately and runs asynchronously. Status reads report progress, the findings count, and start and completion times.

Limits Worth Knowing

  • Public repositories only. The wallet flow does not access private repositories or GitHub App installations; those use an authenticated Firepan account.
  • EVM source code. Solidity and Vyper repositories are supported. Deployed-token risk is a separate product, Sentinel, which agents can query through Firepan's MCP endpoint.
  • Not a certification. Automated results are triage and evidence, not a human-certified audit. Off-chain logic, protocol economics, and key management are outside a code scan.
  • Bounded parameters. Scans accept an optional llm_budget up to 5. Audits cap max_iterations at 30, time_limit_minutes at 120, and plan_n at 5.

When to Use It

  • A coding agent writes or edits a Solidity contract and should check it before proposing a deploy.
  • An agent evaluating a protocol wants a security read on its public repository.
  • A developer tool wants pay-per-use security checks without managing customer accounts.

For a human trying Firepan, the free smart contract scan needs no wallet or account. The full agent instructions, including error handling, are in Firepan's agent skill.

Frequently Asked Questions

Q: Which security API can an AI agent pay for with x402?

A: Firepan's Agent API accepts x402 payments for smart contract security: $0.50 for a public-repository scan and $5.00 for an audit, paid in USDC on Base. No account or API key is needed.


Q: Does the agent need a Firepan account?

A: No. The wallet-native endpoints need only an x402 payment. The returned X-Firepan-Access-Token authorizes reads for that purchased job. Private repositories and dashboard features use a normal Firepan account.


Q: What network and token does Firepan accept?

A: The current discovery document lists USDC on Base (eip155:8453). Always read https://api.firepan.com/.well-known/x402 before paying, since terms can change.


Q: Is there a free option for agents?

A: Yes. POST https://api.firepan.com/surface/scan scans a public repository for free with no authentication. Rate limits apply, and a 429 includes a Retry-After header.


Q: Can an agent check whether a deployed token is risky?

A: Yes, through Sentinel. Firepan's MCP endpoint exposes sentinel_token_report, which reads an existing published token assessment by chain and address without login.

Sources

Firepan

Scan Your Contracts Now

Run a free scan — results in minutes, no credit card required.

Run Free Scan →