Agent API
x402 Protocol Flow
The x402 protocol defines a standard for HTTP-native micro-payments. It transforms the standard 402 Payment Required status code into an automated challenge-and-retry flow.
The Challenge-and-Retry Lifecycle
Initial Unpaid Request
The agent makes a standard POST /api/v2/audit request with the target JSON body. No pre-registered API key or subscription token is required.
HTTP 402 Challenge with Payment Requirements
Verdict intercepts the unpaid request and responds with 402 Payment Required. The response includes the PAYMENT-REQUIRED header detailing the exact price ($0.50 USDC), network (Base eip155:8453), receiver address, and facilitator parameters.
Client Authorization Signing
The agent's x402 client wrapper evaluates the challenge and produces an EIP-712 / EVM payment authorization signature from its local wallet private key.
Authorized Request & Verification
The request is retried with the PAYMENT-SIGNATURE header. Verdict verifies the signature and settles payment authorization on Base before commencing computational audit work.
Fulfillment & 200 OK
Upon successful audit execution, the server returns 200 OK with the structured JSON audit result and the PAYMENT-RESPONSE receipt header.
Key HTTP Header Specifications
| Header | Direction | Description |
|---|---|---|
| PAYMENT-REQUIRED | Server → Client | Base64-encoded JSON or JSON string detailing accepted payment schemes, asset address, amount, and recipient. |
| PAYMENT-SIGNATURE | Client → Server | Cryptographic signature matching the advertised EVM scheme proving authorization to transfer $0.50 USDC. |
| PAYMENT-RESPONSE | Server → Client | Settlement receipt metadata confirming transaction verification on Base. |