x402_manifest_from_openapi
Convert an OpenAPI 3.x or Swagger 2.0 spec into x402 V2 paywall manifests, route configs, discovery schemas, and well-known payment documents for mounting paid API endpoints.
Instructions
Turn an OpenAPI 3.x / Swagger 2.0 spec (JSON or YAML, URL or inline) into a ready-to-mount x402 V2 paywall: per-operation accepts[] (exact, CAIP-2 network, atomic USDC amount, payTo, EIP-712 extra), @x402/core route config, Bazaar discovery input/output schemas, a /.well-known/x402 document and a sample PAYMENT-REQUIRED payload. Costs 0.003 USDC on Base per successful call (x402). Without a payment key this tool returns the 402 challenge.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"payTo": "<payTo>"
},
"name": "x402_manifest_from_openapi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | OpenAPI URL | |
| spec | No | Inline spec (POST) | |
| payTo | Yes | Receiving address | |
| price | No | Default USD price per call | |
| prices | No | JSON map {"GET /path": 0.002} | |
| network | No | CAIP-2, default eip155:8453 | |
| base_url | No | Override server URL |